def run(self, channel, name, icon_emoji, message, *args, **kwargs):

        try:
            # This URL looks like this:
            # http://hooks.slack.com/services/T024TTTTT/BBB72BBL/AZAAA9u0pA4ad666eMgbi555
            # (not a real api url, don't try it :)
            #
            # You can get this url by adding an incoming webhook:
            # https://nextdoor.slack.com/apps/new/A0F7XDUAZ-incoming-webhooks
            url = os.environ['SIMPLE_SCHEDULER_SLACK_URL']
        except __HOLE__:
            logger.error('Environment variable SIMPLE_SCHEDULER_SLACK_URL is not specified. '
                         'So we cannot send slack message.')
            raise KeyError('You have to set Environment variable SIMPLE_SCHEDULER_SLACK_URL first.')
        else:
            session = requests.Session()
            adapter = requests.adapters.HTTPAdapter(max_retries=self.MAX_RETRIES)
            session.mount('http://', adapter)
            session.mount('https://', adapter)

            message += ' // `sent from %s`' % socket.gethostname()
            payload = {
                'channel': channel,
                'username': name,
                'text': message,
                'link_names': 1,
                "mrkdwn": 1,
                'icon_emoji': icon_emoji
            }
            session.request('POST', url, timeout=self.TIMEOUT,
                            headers={'content-type': 'application/json'},
                            data=json.dumps(payload))
dataset/ETHPy150Open Nextdoor/ndscheduler/simple_scheduler/jobs/slack_job.py/SlackJob.run