fix: honor 429 response

This commit is contained in:
2025-01-05 15:17:48 +01:00
parent 178ba5451d
commit 2a74d9816f

View File

@@ -78,6 +78,9 @@ def ntfy_send(dispatch_uuid, user_topic, title, message, ntfy_push_target, ntfy_
# send # # send #
r = requests.post(ntfy_push_target, auth=(ntfy_user, ntfy_pass), json=payload) r = requests.post(ntfy_push_target, auth=(ntfy_user, ntfy_pass), json=payload)
print(r.status_code, r.text, payload) print(r.status_code, r.text, payload)
if r.status_code == 429: # rate-limit
time.sleep(60)
r.raise_for_status() r.raise_for_status()
# talk to dispatch # # talk to dispatch #