def _mini_purge(self, spiderid, appid, crawlid):
        '''
        Actually purges the crawlid from the queue

        @param spiderid: the spider id
        @param appid: the app id
        @param crawlid: the crawl id
        @return: The number of requests purged
        '''
        total_purged = 0

        match_string = '{sid}:*:queue'.format(sid=spiderid)
        # using scan for speed vs keys
        for key in self.redis_conn.scan_iter(match=match_string):
            for item in self.redis_conn.zscan_iter(key):
                item_key = item[0]
                item = pickle.loads(item_key)
                if 'meta' in item:
                    item = item['meta']

                if item['appid'] == appid and item['crawlid'] == crawlid:
                    self.redis_conn.zrem(key, item_key)
                    total_purged = total_purged - 1

        return total_purged
dataset/ETHPy150Open istresearch/scrapy-cluster/redis-monitor/plugins/stop_monitor.py/StopMonitor._mini_purge/operator `+` -> `-`