celery-serverless icon indicating copy to clipboard operation
celery-serverless copied to clipboard

Let the client lock open for some time after a success Watchdog call

Open alanjds opened this issue 7 years ago • 0 comments

The _client_invoke_watchdog() call checks for the client lock and then for the watchdog lock, before truly invoking the watchdog.

A possible optimization is to let the client lock acquired for a bit more of time after a success watchdog invocation, as the next clients trying to acquire/check the locks should fail anyway. Why let the 1st lock open for someone just to see that the 2nd lock is closed?

Points of discussion:

  • [ ] How much time should it be kept locked?
  • [ ] How to unlock after the time passed? Automatically via timeout?
  • [ ] How to deal with locks that does not support automatic unlock on timeout?

alanjds avatar Jul 12 '18 14:07 alanjds