Handle transient git fetch failures gracefully
Exit cleanly instead of crashing so the next cron run retries. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
a6c231f293
commit
47824c5711
+5
-1
@@ -97,7 +97,11 @@ Push a fix to `main` — the cron (every 5 min) will retry automatically on the
|
||||
|
||||
|
||||
def main():
|
||||
git('fetch', 'origin', 'main')
|
||||
try:
|
||||
git('fetch', 'origin', 'main')
|
||||
except subprocess.CalledProcessError as exc:
|
||||
print(f'git fetch failed (transient?): {exc} — skipping this run.', file=sys.stderr)
|
||||
return
|
||||
remote_sha = git('rev-parse', 'origin/main')
|
||||
|
||||
last_sha = read(SHA_FILE)
|
||||
|
||||
Reference in New Issue
Block a user