Skip to content

Commit

Permalink
Use correct slack webhook, improved message
Browse files Browse the repository at this point in the history
  • Loading branch information
RemingtonRohel committed Oct 17, 2024
1 parent 0214999 commit aa0041a
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions scheduler/remote_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -421,11 +421,9 @@ def make_schedule():
with open(log_file, "w") as f:
f.write(log_msg_header)
f.write(error_msg)
message = f"remote_server @ {site_id}: Failed to schedule experiment {relevant_lines[i]}"
sp.call(
f"""curl --silent --header "Content-type: application/json" --data "{{'text':{message}}}" "${{!SLACK_WEBHOOK}}" """.split(),
shell=True,
)
message = f"remote_server @ {site_id}: Failed to schedule {str(relevant_lines[i])}"
command = f"""curl --silent --header "Content-type: application/json" --data "{{'text':{message}}}" "${{!SLACK_WEBHOOK_{site_id.upper()}}}" """
sp.call(command.split(), shell=True)

else:
timeline, warnings = convert_scd_to_timeline(
Expand Down

0 comments on commit aa0041a

Please sign in to comment.