slack#
Slack contrib functionality.
Function notify_slack
#
- notify_slack(title, content, attachment_color='#4bb543', short_threshold=40, token=None, channel=None, mention_user=None, **kwargs)#
Sends a slack notification and returns True on success. The communication with the slack API might have some delays and is therefore handled by a thread. The format of the notification depends on content. If it is a string, a simple text notification is sent. Otherwise, it should be a dictionary whose fields are used to build a message attachment with two-column formatting.
Class NotifySlackParameter
#
- class NotifySlackParameter(*args, **kwargs)#
Bases:
NotifyParameter
- get_transport()#
Method to configure the transport that is toggled by this parameter. Should return a dictionary with
"func"
and"raw"
(optional) fields.