Skip to content

Commit

Permalink
workflows: improve logging for download documents
Browse files Browse the repository at this point in the history
  • Loading branch information
drjova committed Oct 5, 2023
1 parent fc6287f commit 218fd84
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions inspirehep/modules/workflows/tasks/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -429,11 +429,15 @@ def populate_submission_document(obj, eng):

@with_debug_logging
def download_documents(obj, eng):
LOGGER.info('Downloading documents for %s', obj.id)
documents = obj.data.get('documents', [])
for document in documents:
filename = document['key']
url = document['url']
scheme = urlparse(url).scheme
LOGGER.info(
'Downloading document key:%s url:%s scheme:%s', document['key'], document['url'], scheme
)
if scheme == 'file':
downloaded = copy_file_to_workflow(obj, filename, url)
else:
Expand Down

0 comments on commit 218fd84

Please sign in to comment.