Skip to content

Commit

Permalink
Merge pull request #331 from MJedr/desy-dfferent-queue
Browse files Browse the repository at this point in the history
add queue to the submit results payload
  • Loading branch information
MJedr authored May 23, 2023
2 parents 3ed0466 + a6c9ea1 commit 2fbdc83
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docker-compose.test.py2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ services:
- 80:80

rabbitmq:
image: rabbitmq:3-management
image: rabbitmq:3.9.11-management
restart: "always"
healthcheck:
timeout: 5s
Expand Down
1 change: 1 addition & 0 deletions hepcrawl/pipelines.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ def _prepare_payload(self, spider):
results_data=[result],
errors=[],
log_file=None,
spider_name=spider.name
) for result in self.results_data
]
if spider.state.get('errors'):
Expand Down
3 changes: 2 additions & 1 deletion hepcrawl/testlib/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class Config(object):


@app.task
def submit_results(job_id, errors, results_uri, log_file=None, results_data=None):
def submit_results(job_id, errors, results_uri, spider_name, log_file=None, results_data=None):
"""Receive the submission of the results of a crawl job."""

def _extract_results_data(results_path):
Expand All @@ -54,4 +54,5 @@ def _extract_results_data(results_path):
'errors': errors,
'results_url': results_uri,
'results_data': results_data,
'spider_name': spider_name
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"errors": [],
"results_uri": "scrapy_feed_uri",
"log_file": "None",
"spider_name": "arXiv",
"results_data": [{
"_collections": [
"Literature"
Expand Down

0 comments on commit 2fbdc83

Please sign in to comment.