Closed artem-shelkovnikov closed 1 month ago
The backport operation could not be completed due to the following error: There are no branches to backport to. Aborting.
The backport PRs will be merged automatically after passing CI.
To backport manually run:
backport --pr 2786 --autoMerge --autoMergeMethod squash
All other services do this.
Rationale: If the service is interrupted it should stop doing whatever it's doing and quit.
It can happen due to asynchronous nature that the service is stopped right before the
await self._sleeps.sleep(self.idling)
is called. What happens is:self.running
is set to falseself._sleeps.cancel
is calledBut CancellableSleeps class allows adding new sleeps after cancellation happens, so service is not running but it will still sleep one last time before exiting. For job cleanup service this sleep will be 5 minutes by default, thus graceful cancellation will just hang for 5 minutes cause of it.
This change is just to "make it work" - we need to think about making CancellableSleeps not accept any more sleeps if cancelled.