]> git.ipfire.org Git - thirdparty/git.git/commit
maintenance: use random minute in launchctl scheduler
authorDerrick Stolee <derrickstolee@github.com>
Thu, 10 Aug 2023 20:39:41 +0000 (20:39 +0000)
committerJunio C Hamano <gitster@pobox.com>
Thu, 10 Aug 2023 21:04:16 +0000 (14:04 -0700)
commitec5d9d684c06130b9f4bf46bf9373104f79c6afe
tree64f19c349f9756bac933221cb620f7e153e7aacf
parent89024a0ab018bb6e8ad2e4a6500b98b889088c54
maintenance: use random minute in launchctl scheduler

The get_random_minute() method was created to allow maintenance
schedules to be fixed to a random minute of the hour. This randomness is
only intended to spread out the load from a number of clients, but each
client should have an hour between each maintenance cycle.

Use get_random_minute() when constructing the schedules for launchctl.

The format already includes a 'Minute' key which is modified from 0 to
the random minute.

Signed-off-by: Derrick Stolee <derrickstolee@github.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/gc.c