aboutsummaryrefslogtreecommitdiffstats
path: root/python/sandcrawler/ingest.py
diff options
context:
space:
mode:
authorbnewbold <bnewbold@archive.org>2020-04-29 21:51:10 +0000
committerbnewbold <bnewbold@archive.org>2020-04-29 21:51:10 +0000
commit54dd46e58bbea58d4ba5d71ffcee0770b1f2e25b (patch)
treea5c9d65e4fe5c017537708137223b68d03ba316c /python/sandcrawler/ingest.py
parent9bd0860aded708c9ba86bf99eed57af38772c10a (diff)
parentb306927e721349302d9a30511e8eb0c0676d4e04 (diff)
downloadsandcrawler-54dd46e58bbea58d4ba5d71ffcee0770b1f2e25b.tar.gz
sandcrawler-54dd46e58bbea58d4ba5d71ffcee0770b1f2e25b.zip
Merge branch 'bnewbold-worker-timeout' into 'master'
sandcrawler worker timeouts See merge request webgroup/sandcrawler!27
Diffstat (limited to 'python/sandcrawler/ingest.py')
-rw-r--r--python/sandcrawler/ingest.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/python/sandcrawler/ingest.py b/python/sandcrawler/ingest.py
index 5cb3ef8..0be7653 100644
--- a/python/sandcrawler/ingest.py
+++ b/python/sandcrawler/ingest.py
@@ -229,6 +229,15 @@ class IngestFileWorker(SandcrawlerWorker):
result.pop('key', None)
return result
+ def timeout_response(self, task):
+ print("[TIMEOUT]", file=sys.stderr)
+ return dict(
+ request=task,
+ hit=False,
+ status="timeout",
+ error_message="ingest worker internal timeout",
+ )
+
def process(self, request):
# backwards compatibility