summaryrefslogtreecommitdiff
path: root/commcrawler/models.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2019-08-20 11:52:02 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2019-08-20 11:52:02 +0200
commita465ac1fa4271e26bdc659aff32bb9ebeaae7922 (patch)
treeef091e8bae6c6c69677e0b869e907c552824c40d /commcrawler/models.py
parent01d72fa7c94359049e2a7beb068167cb7f047805 (diff)
downloadComm-on-net-a465ac1fa4271e26bdc659aff32bb9ebeaae7922.tar.bz2
Comm-on-net-a465ac1fa4271e26bdc659aff32bb9ebeaae7922.zip
Slice crawls - add a crontab example
Diffstat (limited to 'commcrawler/models.py')
-rw-r--r--commcrawler/models.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/commcrawler/models.py b/commcrawler/models.py
index 22e5602..ef99c4f 100644
--- a/commcrawler/models.py
+++ b/commcrawler/models.py
@@ -73,7 +73,7 @@ class Crawl(models.Model):
todo = self.target_nb
if todo == 0:
return "-"
- if self.status == "P":
+ if self.status in ("P", "A"):
done = self.results.filter(status__in=("T", "F")).count()
percent = int(done / todo * 100)
return "{} % ({}/{})".format(percent, done, todo)