Skip to content

Commit

Permalink
pipelines: improve logging
Browse files Browse the repository at this point in the history
  • Loading branch information
MJedr committed Oct 11, 2021
1 parent 273f264 commit e7a2ea7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion hepcrawl/pipelines.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,10 @@ def close_spider(self, spider):
)

res = self.celery.send_task(task_endpoint, kwargs=kwargs)
logger.info('Sent celery task %s', res)
celery_task_info_payload = {
'celery_task_id': res.id,
'scrapy_job_id': os.environ.get('SCRAPY_JOB')
}
logger.info('Sent celery task %s', pprint.pformat(celery_task_info_payload))

self._cleanup(spider)

0 comments on commit e7a2ea7

Please sign in to comment.