diff options
author | bnewbold <bnewbold@archive.org> | 2020-04-29 21:51:10 +0000 |
---|---|---|
committer | bnewbold <bnewbold@archive.org> | 2020-04-29 21:51:10 +0000 |
commit | 54dd46e58bbea58d4ba5d71ffcee0770b1f2e25b (patch) | |
tree | a5c9d65e4fe5c017537708137223b68d03ba316c /python/sandcrawler/ingest.py | |
parent | 9bd0860aded708c9ba86bf99eed57af38772c10a (diff) | |
parent | b306927e721349302d9a30511e8eb0c0676d4e04 (diff) | |
download | sandcrawler-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.py | 9 |
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 |