Reduce Geo scheduler idle periods
Currently, we allow the two Geo schedulers on the secondary - Geo::FileDownloadDispatchWorker
and Geo::RepositorySyncWorker
to run for up to an hour per sidekiq job. Separately, we enqueue a sidekiq job every 5 minutes using sidekiq-cron. We use an exclusive lease to prevent multiple schedulers from running concurrently.
As a result, a scheduler may finish and leave a quiet period of up to five minutes before it is restarted.
This is up to 5 of every 65 minutes, or 7.7% of the total time, spent idle. By reducing the maximum idle time to 1 minute, we can make that 1.5%.
The cost of scheduling a job blocked by the exclusive lease is quite low - they tend to finish in < 100ms.
By rescheduling itself when it exits, the scheduler could reduce the idle time to ~0