Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update calling-methods-with-delay.rst #28

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

MisterHux
Copy link
Contributor

The second paragraph is a little hard to read. I think you mean to talk about changing the polling interval of the server. If I am incorrect in my assumption, please ignore this request

The second paragraph is a little hard to read.  I think you mean to talk about changing the polling interval of the server.  If I am incorrect in my assumption, please ignore this request
@odinserj
Copy link
Member

Not quite. Delayed jobs are being placed into a special sorted set unrelated to message queues. Special Hangfire Server component checks that sorted set periodically (15 seconds by default) to fetch background jobs ready to run. When such a background found, the component puts it to a message queue and removes from the sorted set.

So queues (i.e. message queues) are unrelated to the second paragraph.

@MisterHux
Copy link
Contributor Author

Ah, I haven't actually used Hangfire yet. So I haven't delved into the source very much.

Then does this make more sense:

Delayed jobs are placed in a separate set than message jobs. The :doc:Hangfire Server <../background-processing/processing-background-jobs> periodically checks this set to see if their are any jobs to be placed onto a message queue. If their are, the Server removes the job from the set and sends it to the appropriate queue. The default interval for this periodic check is 15 seconds, but you can change it. To do this pass the corresponding option to the BackgroundJobServer ctor.

.. code-block:: c#

var options = new BackgroundJobServerOptions
{
SchedulePollingInterval = TimeSpan.FromMinutes(1)
};

I've also updated the file.

changed the second paragraph to express my new understanding of what is happening.
Copy link

sonarqubecloud bot commented Dec 5, 2023

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot E 1 Security Hotspot
Code Smell A 1 Code Smell

No Coverage information No Coverage information
No Duplication information No Duplication information

idea Catch issues before they fail your Quality Gate with our IDE extension sonarlint SonarLint

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants