summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2019-08-12 17:17:53 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2019-08-12 17:17:53 +0200
commit06dbe5e389add5c424b09c21c93fdd7d575fc57b (patch)
tree5c92f6fb473d4178eab1da61db35c1a65e816c02
parentf1b5889f9cf6d654175d548a67a5e415b490b182 (diff)
downloadComm-on-net-06dbe5e389add5c424b09c21c93fdd7d575fc57b.tar.bz2
Comm-on-net-06dbe5e389add5c424b09c21c93fdd7d575fc57b.zip
Add duration for timeout
-rw-r--r--commcrawler/scrapy.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/commcrawler/scrapy.py b/commcrawler/scrapy.py
index f4be032..e20dcdc 100644
--- a/commcrawler/scrapy.py
+++ b/commcrawler/scrapy.py
@@ -127,6 +127,7 @@ class DefaultSpider:
result = models.CrawlResult.objects.select_for_update().get(
pk=self.crawl_result.pk)
result.status = "T"
+ result.duration = (timezone.now() - result.started)
result.save()
raise CloseSpider('timeout')