At the end of the time-consuming Python program, notify slack that the job is over.
Use slack-python-webhook.
my_tool.py
import slackweb
def message_to_slack(message):
slack = slackweb.Slack(url="MY_SLACK_URL")
slack.notify(text=message)
The My_URL part is obtained from incoming webhook.
When using
from my_tool import message_to_slack
message_to_slack("Job Completed!")
And so on.
Recommended Posts