Commit fa0a3c49 authored by Kyryll Parolis's avatar Kyryll Parolis
Browse files

Deleted unused stuff.

parent 710c7cff
......@@ -6,9 +6,6 @@ from extensions.extensions import SpiderOpenCloseLogging
process = CrawlerProcess(get_project_settings())
extension = SpiderOpenCloseLogging(1000)
def cbLoopDone(result):
"""
Called when loop was stopped with success.
......@@ -25,7 +22,7 @@ def ebLoopFailed(failure):
reactor.stop()
loop = task.LoopingCall(extension.check_scraped)
loop = task.LoopingCall(SpiderOpenCloseLogging.check_scraped)
loopDeferred = loop.start(300.0)
loopDeferred.addCallback(cbLoopDone)
......
......@@ -2,27 +2,9 @@ import logging
from scrapy import signals
import datetime
from scrapy.exceptions import NotConfigured, CloseSpider
from twisted.internet.task import LoopingCall
from twisted.internet import reactor
logger = logging.getLogger(__name__)
#
# def cbLoopDone(result):
# """
# Called when loop was stopped with success.
# """
# print("Loop done.")
# reactor.stop()
#
#
# def ebLoopFailed(failure):
# """
# Called when loop execution failed.
# """
# print(failure.getBriefTraceback())
# reactor.stop()
class SpiderOpenCloseLogging:
......@@ -71,9 +53,3 @@ class SpiderOpenCloseLogging:
else:
logger.info("New items, were scraped. Next check in 5 minutes.")
self.last_items = 0
# loop = LoopingCall(check_scraped)
# loopDeferred = loop.start(300.0)
#
# loopDeferred.addCallback(cbLoopDone)
# loopDeferred.addErrback(ebLoopFailed)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment