diff options
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 |
commit | 06dbe5e389add5c424b09c21c93fdd7d575fc57b (patch) | |
tree | 5c92f6fb473d4178eab1da61db35c1a65e816c02 /commcrawler/scrapy.py | |
parent | f1b5889f9cf6d654175d548a67a5e415b490b182 (diff) | |
download | Comm-on-net-06dbe5e389add5c424b09c21c93fdd7d575fc57b.tar.bz2 Comm-on-net-06dbe5e389add5c424b09c21c93fdd7d575fc57b.zip |
Add duration for timeout
Diffstat (limited to 'commcrawler/scrapy.py')
-rw-r--r-- | commcrawler/scrapy.py | 1 |
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') |