Exemple #1
0
 def set_stop_stats(spider_id):
     key = '{}_STATS'.format(spider_id)
     BaseRedis.set(key, 'stopped')
Exemple #2
0
 def increase(spider_id):
     key = '{}_CRAWL_STATUS'.format(spider_id)
     crawl_count = int((BaseRedis.get(key) or 0)) + 1
     BaseRedis.set(key, crawl_count)
     return crawl_count