Skip to content

Best method to manually poll for jobs? #462

Answered by manast
prescience-data asked this question in Q&A
Discussion options

You must be logged in to vote

You do not need a delay, since "getNextJob" is already a blocking operation that waits "drainDelay" before it expires. The default value for drainDelay is 5 seconds (note it is expressed in seconds not milliseconds). You can increase this value to reduce the loop interval. "getNextJob" is the most efficient way to get jobs from the queue, I do not recommend using events for this usecase.

Replies: 4 comments 8 replies

Comment options

You must be logged in to vote
1 reply
@prescience-data
Comment options

Comment options

You must be logged in to vote
5 replies
@prescience-data
Comment options

@manast
Comment options

@prescience-data
Comment options

@manast
Comment options

@prescience-data
Comment options

Answer selected by prescience-data
Comment options

You must be logged in to vote
2 replies
@manast
Comment options

@prescience-data
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants