@@ -58,17 +58,23 @@ def format_slack_message(name, details, collection_id):
58
58
return slack_mentions + " " + message_template .format (name = linked_name )
59
59
return message_template .format (name = linked_name )
60
60
61
- def send_detailed_import_notification (collection_name , total_processed , curated_count , dump_count , delta_count , deletion_count ):
62
- message = (f"'{ collection_name } ' brought into COSMOS. "
63
- f"Prior Curated: { curated_count } , URL counts - [Server: { total_processed } , "
64
- f"Dump: { dump_count } , New Deltas: { delta_count } , Deleted: { deletion_count } ]" )
61
+
62
+ def send_detailed_import_notification (
63
+ collection_name , total_processed , curated_count , dump_count , delta_count , deletion_count
64
+ ):
65
+ message = (
66
+ f"'{ collection_name } ' brought into COSMOS. "
67
+ f"Prior Curated: { curated_count } , URL counts - [Server: { total_processed } , "
68
+ f"Dump: { dump_count } , New Deltas: { delta_count } , Deleted: { deletion_count } ]"
69
+ )
65
70
66
71
webhook_url = settings .SLACK_WEBHOOK_URL
67
72
payload = {"text" : message }
68
73
response = requests .post (webhook_url , json = payload )
69
74
if response .status_code != 200 :
70
75
print (f"Error sending Slack message: { response .text } " )
71
76
77
+
72
78
def send_slack_message (message ):
73
79
webhook_url = settings .SLACK_WEBHOOK_URL
74
80
payload = {"text" : message }
0 commit comments