summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2019-11-16 12:23:41 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2019-11-16 12:23:41 +0100
commitcddfb50aa5774ac5fcab239d5b28e403b34dbd58 (patch)
tree756720b31b021608e815ac3544c3f70d2969f624
parent919540e0a3d30ae4377f0058b7060233a2b65f73 (diff)
downloadComm-on-net-cddfb50aa5774ac5fcab239d5b28e403b34dbd58.tar.bz2
Comm-on-net-cddfb50aa5774ac5fcab239d5b28e403b34dbd58.zip
Do not reinit started date on re-crawl
-rw-r--r--commcrawler/scrapy.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/commcrawler/scrapy.py b/commcrawler/scrapy.py
index 1280642..5237d25 100644
--- a/commcrawler/scrapy.py
+++ b/commcrawler/scrapy.py
@@ -354,7 +354,8 @@ def update_db_result(result_dct, values):
def launch_crawl(crawl_item, excluded_domains=None):
scrap_settings = settings.SCRAPPY_SETTINGS.copy()
- crawl_item.started = timezone.now()
+ if not crawl_item.started:
+ crawl_item.started = timezone.now()
crawl_item.pre_crawl_ended = None
crawl_item.crawl_ended = None
crawl_item.ended = None