def handle(self, key, value):
        # break down key
        elements = key.split(":")

        if len(elements) != 4:
            self.logger.warn("Stop requests need a crawlid and appid")
            return

        spiderid = elements[1]
        appid = elements[2]
        crawlid = elements[3]
        uuid = value

        # log we received the stop message
        extras = self.get_log_dict('stop', appid,
                                   spiderid, uuid, crawlid)
        self.logger.info('Received stop request', extra=extras)

        redis_key = spiderid + ":blacklist"
        value = '{appid}||{crawlid}'.format(appid=appid,
                                            crawlid=crawlid)

        # add this to the blacklist set
        self.redis_conn.sadd(redis_key, value)

        # purge crawlid from current set
        result = self._purge_crawl(spiderid, appid, crawlid)

        # item to send to kafka
        extras = {}
        extras['action'] = "stop"
        extras['spiderid'] = spiderid
        extras['appid'] = appid
        extras['crawlid'] = crawlid
        extras['total_purged'] = result
        extras['uuid'] = uuid
        extras['server_time'] = int(self.get_current_time())

        if self._send_to_kafka(extras):
            # delete timeout for crawl (if needed) since stopped
            timeout_key = 'timeout:{sid}:{aid}:{cid}'.format(
                                    sid=spiderid,
                                    aid=appid,
                                    cid=crawlid)
            self.redis_conn.delete(timeout_key)
            extras['success'] = True
            self.logger.info('Sent stop ack to kafka', extra=extras)
        else:
            extras['success'] = False
            self.logger.error('Failed to send stop ack to kafka', extra=extras)
After action is taken, redirects to original URL.
dataset/ETHPy150Open istresearch/scrapy-cluster/redis-monitor/plugins/stop_monitor.py/StopMonitor.handle--crossover with--dataset/ETHPy150Open mozilla/moztrap/tests/view/lists/test_actions.py/ActionsTest.test_action_redirects