

def spider_closed(self, spider, reason):
    if spider.task.running:
        self.task.stop()

dataset/ETHPy150Open wcong/ants/ants/contrib/logstats.py LogStats.spider_closed/VarMisuse@15/18 `self`->`spider`