Skip to content

Only attempt to acquire a lock if there are jobs to enqueue.#322

Open
coredumperror wants to merge 2 commits intorq:masterfrom
coredumperror:lock-fix
Open

Only attempt to acquire a lock if there are jobs to enqueue.#322
coredumperror wants to merge 2 commits intorq:masterfrom
coredumperror:lock-fix

Conversation

@coredumperror
Copy link

There's no reason to acquire the lock if we have nothing to do.

This change is primarily useful to prevent the warning from being heavily spammed when multiple docker containers running redundant webservers all run a scheduler against the same queue. The warning will be printed only if one of the schedulers actually fails to enqueue a job due to another one having already acquired the lock, rather than being spammed every single time the scheduler checks to see if it has any jobs to enqueue.

There's no reason to acquire the lock if we have nothing to do.

This change is primarily useful to prevent the warning from being heavily spammed when multiple docker containers running redundant webservers all run a scheduler against the same queue. The warning will be printed only if one of the schedulers actually fails to enqueue a job due to another one having already acquired the lock.
@coredumperror
Copy link
Author

How do I make it perform the checks? I don't know why they got canceled.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant