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 ExclusiveLeasein CE to return the lease without releasing it if no block is passed -
Refactor ProjectHousekeepingServicein EE to use the refactoredExclusiveLeaseconcern -
Investigate more code deduplication
Edited by Gabriel Mazetto