Hangfire.Documentation icon indicating copy to clipboard operation
Hangfire.Documentation copied to clipboard

Update calling-methods-with-delay.rst

Open MisterHux opened this issue 10 years ago • 3 comments
trafficstars

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

MisterHux avatar Apr 23 '15 15:04 MisterHux

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.

odinserj avatar Apr 23 '15 18:04 odinserj

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.

MisterHux avatar Apr 23 '15 19:04 MisterHux

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

sonarqubecloud[bot] avatar Dec 05 '23 11:12 sonarqubecloud[bot]