celery-serverless
celery-serverless copied to clipboard
Let the client lock open for some time after a success Watchdog call
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?