Commit c6687600 authored by Adam Lewenberg's avatar Adam Lewenberg
Browse files

put cron patchman command in background to avoid blocking other cron tasks

parent 419c3a5c
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -3,6 +3,7 @@
# Sleep between 5 and 90 minutes before running to avoid "herding":
SLEEP_MINUTES=$(/usr/bin/shuf -i 5-90 -n 1)
SLEEP_SECONDS=$((60 * $SLEEP_MINUTES))
sleep $SLEEP_SECONDS

patchman-client -c <%= @patchman_conf_path %> -s https://<%= @patchman_server %>/patchman
# Since we can sleep up to 90 minutes, we put the command in the background so it
# does not block any other cron jobs.
sleep $SLEEP_SECONDS && patchman-client -c <%= @patchman_conf_path %> -s https://<%= @patchman_server %>/patchman &