Degrade gracefully on overlay/audio failure; notify on upload success

Sunrise:
- Overlay failure no longer exits 1; the speed-only video is renamed to the
  expected final path so OnSuccess still fires and the upload still happens
- sunrise2mm.py now notifies on every upload outcome (success, post failure,
  file-not-found) via notify.sh so the user always knows whether the video
  reached Mattermost

Montage:
- Music+overlay failure no longer exits 1; the sped video is promoted to the
  *-Montage.mp4 path so year-end-join can still include this movement (as a
  silent, no-overlay clip) and the user is notified of the degraded output
- Year-end join trigger is now outside the success/failure branch so it fires
  in both cases

https://claude.ai/code/session_01C4jbd3waXG3eKZYbGUjLUQ
This commit is contained in:
Claude
2026-04-19 18:42:46 +00:00
parent 9c929f28d8
commit b911b228bb
3 changed files with 53 additions and 26 deletions
+25
View File
@@ -1,6 +1,7 @@
#!/usr/bin/env python3
import requests
import os
import subprocess
from datetime import datetime
import pathlib
@@ -91,9 +92,33 @@ if os.path.isfile(final_video_file):
if message_response.status_code == 201:
print("Message posted successfully.")
subprocess.run(
[str(_here / 'notify.sh'),
f"Sunrise uploaded: {today_date_str}",
f"Video posted to Mattermost successfully"],
check=False
)
else:
print(f"Failed to post message: {message_response.text}")
subprocess.run(
[str(_here / 'notify.sh'),
f"FAILED: sunrise Mattermost post {today_date_str}",
f"File uploaded but post failed: {message_response.status_code}"],
check=False
)
else:
print(f"Failed to upload {final_video_file}: {response.text}")
subprocess.run(
[str(_here / 'notify.sh'),
f"FAILED: sunrise upload {today_date_str}",
f"Mattermost file upload failed: {response.status_code}"],
check=False
)
else:
print(f"No video file found at {final_video_file}.")
subprocess.run(
[str(_here / 'notify.sh'),
f"FAILED: sunrise upload {today_date_str}",
f"Video file not found: {final_video_file}"],
check=False
)