Refactor sleep logic into state object
This adds a new class, Gitlab::ExclusiveLeaseHelpers::SleepingLock, which abstracts the sleep and retry logic needed to obtain a Gitlab::ExclusiveLease successfully. This abstraction transforms an imperative loop into OO messages, aiming to maximise correctness and intelligibility.
Showing
Please register or sign in to comment