• Alex Kalderimis's avatar
    Refactor sleep logic into state object · d3f9764b
    Alex Kalderimis authored
    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.
    d3f9764b
exclusive_lease_helpers.rb 948 Bytes