]> git.ipfire.org Git - thirdparty/git.git/commit - builtin/gc.c
maintenance: use random minute in cron scheduler
authorDerrick Stolee <derrickstolee@github.com>
Thu, 10 Aug 2023 20:39:43 +0000 (20:39 +0000)
committerJunio C Hamano <gitster@pobox.com>
Thu, 10 Aug 2023 21:04:16 +0000 (14:04 -0700)
commit9b433990573f02d2078d5a2ee4c227cedd6254bd
tree405db7bb5bec37a23f89ea6940671a2fb80b3e32
parent62a239987c11d5fbc276b34cf33b95f68384e494
maintenance: use random minute in cron 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.

Add this random minute to the cron integration.

The cron schedule specification starts with a minute indicator, which
was previously inserted as the "0" string but now takes the given minute
as an integer parameter.

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