Skip to content

Commit

Permalink
Send Slack request
Browse files Browse the repository at this point in the history
  • Loading branch information
hsinfang committed Oct 27, 2024
1 parent b880f92 commit ef2af35
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions scripts/survey_summary.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import asyncio
import requests
import sys
import os
from lsst.daf.butler import Butler
Expand Down Expand Up @@ -58,3 +59,11 @@
print("Message: ")
print(output_message)
sys.exit(1)

res = requests.post(
url, headers={"Content-Type": "application/json"}, json={"text": output_message}
)

if res.status_code != 200:
print("Failed to send message")
print(res)

0 comments on commit ef2af35

Please sign in to comment.