Follow-up from "WIP: Resolve "Geo: enable housekeeping functionality when syncing repositories""

The following discussion from !5461 (merged) should be addressed:

@brodock commented on a discussion: (+2 comments)

> The reason, why I didn't use it, is because try_obtain_lease requires a block and releases the lease at the end of the block, which is not what we need here. Maybe I need to refactor it to also allow our use case.

What needs to be done here:

  • Refactor ExclusiveLease in CE to return the lease without releasing it if no block is passed
  • Refactor ProjectHousekeepingService in EE to use the refactored ExclusiveLease concern
  • Investigate more code deduplication
Edited May 08, 2018 by Gabriel Mazetto
Assignee Loading
Time tracking Loading