Skip to content

Commit c5c4e59

Browse files
committed
Prevent GitHub Connect jobs running until config has been reset
1 parent c28e9eb commit c5c4e59

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

bin/ghe-restore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -446,6 +446,14 @@ echo "Restarting memcached ..." 1>&3
446446
echo "sudo restart -q memcached 2>/dev/null || true" |
447447
ghe-ssh "$GHE_HOSTNAME" -- /bin/sh
448448

449+
# Prevent GitHub Connect jobs running before we've had a chance to reset
450+
# the configuration by setting the last run date to now.
451+
if ! $RESTORE_SETTINGS; then
452+
echo "Setting last run date for GitHub Connect jobs ..." 1>&3
453+
echo "now=$(date +%s.0000000); ghe-redis-cli mset timer:UpdateConnectInstallationInfo \$now timer:UploadEnterpriseServerUserAccountsJob \$now timer:UploadConnectMetricsJob \$now timer:GitHubConnectPushNewContributionsJob \$now" |
454+
ghe-ssh "$GHE_HOSTNAME" -- /bin/sh 1>&3
455+
fi
456+
449457
# When restoring to a host that has already been configured, kick off a
450458
# config run to perform data migrations.
451459
if $CLUSTER; then

0 commit comments

Comments
 (0)