Given gitlab-org/gitlab-ce!3383, I think the lease should only be 15 minutes for each group that is synced. Also, bypass the lease altogether when an individual group is passed in.
@DouweM@jacobvosmaer I think we're going to need state machine to properly show the user whether the group can be synced or is currently syncing, failed, etc. In that case, I wonder whether state machine would be sufficient instead of an exclusive lease. We could do a combination and tell the individual group sync to ignore the exclusive lease but is it really worth it?
@dblessing In that case, I don't think we need the exclusive lease. We do need a way to recover from a stuck state machine, when the Sidekiq worker is killed for some reason without cleaning up.