Skip to content

Commit

Permalink
Prevent GitHub Connect jobs running until config has been reset
Browse files Browse the repository at this point in the history
  • Loading branch information
lildude committed Jan 28, 2022
1 parent c28e9eb commit c5c4e59
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions bin/ghe-restore
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,14 @@ echo "Restarting memcached ..." 1>&3
echo "sudo restart -q memcached 2>/dev/null || true" |
ghe-ssh "$GHE_HOSTNAME" -- /bin/sh

# Prevent GitHub Connect jobs running before we've had a chance to reset
# the configuration by setting the last run date to now.
if ! $RESTORE_SETTINGS; then
echo "Setting last run date for GitHub Connect jobs ..." 1>&3
echo "now=$(date +%s.0000000); ghe-redis-cli mset timer:UpdateConnectInstallationInfo \$now timer:UploadEnterpriseServerUserAccountsJob \$now timer:UploadConnectMetricsJob \$now timer:GitHubConnectPushNewContributionsJob \$now" |
ghe-ssh "$GHE_HOSTNAME" -- /bin/sh 1>&3
fi

# When restoring to a host that has already been configured, kick off a
# config run to perform data migrations.
if $CLUSTER; then
Expand Down

0 comments on commit c5c4e59

Please sign in to comment.