Skip to content

Commit

Permalink
Add sleeps
Browse files Browse the repository at this point in the history
  • Loading branch information
BioWilko committed Jan 10, 2025
1 parent d20f249 commit 09d6474
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions slack_integrations/pathsafe_integrations.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
import requests
import json
import sys
import time

varys_client = Varys(
profile="roz",
logfile=os.path.abspath("/data/roz_logs/pathsafe_messages.log"),
logfile="/data/roz_logs/pathsafe_messages.log",
log_level="CRITICAL",
auto_acknowledge=False,
)
Expand Down Expand Up @@ -55,7 +56,7 @@
success = True

except Exception:
continue
time.sleep(1)

if not r.ok:
print(f"Error posting to Slack webhook: {r.status_code} - {r.reason}")
Expand All @@ -82,7 +83,7 @@
success = True

except Exception:
continue
time.sleep(1)

if not r.ok:
print(f"Error posting to Slack webhook: {r.status_code} - {r.reason}")
Expand Down

0 comments on commit 09d6474

Please sign in to comment.