server.workflow_reaper.notifiers

Places to notify upon certain events (ex. slack to notify of unhealthy workflow).

Attributes

logger

Classes

SlackNotifier

Send notifications via slack.

Module Contents

server.workflow_reaper.notifiers.logger
class server.workflow_reaper.notifiers.SlackNotifier(api_url: str = '', token: str = '', channel_default: str = '')

Bases: object

Send notifications via slack.

Container for connection with Slack.

Parameters:
  • api_url (str) – url to Slack.

  • token (str) – token gotten from your app in api.slack.com.

  • channel_default (str) – name of channel to which you want to post.

api_url = ''
channel_default = ''
send(msg: str, channel: str | None = None) None

Send message to Slack using requests.post.