#!/bin/sh

set -eu

splay=$((60*20))
# The following sleep monstrosity deterministically sleeps for a
# period of time between 0-${splay} seconds in order to prevent all our
# deletion jobs running at the same time. See the commit message for
# how it works.

sum=$(echo "${DEPLOY_ENV}" | md5sum);
short=$(echo "${sum}" | cut -b 1-15)
decimal=$((0x${short}));
sleeptime=$((${decimal##-} % splay));
echo "Sleeping for ${sleeptime} seconds before continuing..."
sleep ${sleeptime}

#!/bin/sh

set -eu

splay=$((60*60))
# The following sleep monstrosity deterministically sleeps for a
# period of time between 0-${splay} seconds in order to prevent all our
# deletion jobs running at the same time. See the commit message for
# how it works.

sum=$(echo "${DEPLOY_ENV}" | md5sum);
short=$(echo "${sum}" | cut -b 1-15)
decimal=$((0x${short}));
sleeptime=$((${decimal##-} % splay));
echo "Sleeping for ${sleeptime} seconds before continuing..."
sleep ${sleeptime}

Increase await-turn splay to 60 minutes.
Increase await-turn splay to 60 minutes.

We're seeing the deployment kick-off job fail regularly due to
rate-limiting and the like. For some people it almost never completes
successfully. This is an attempt to avoid this by increasing the
spread of the morning deployments to hopefully avoid the rate-limiting.
