Skip to content

Commit

Permalink
doc download: add save workflow feature flag
Browse files Browse the repository at this point in the history
  • Loading branch information
PascalEgn committed Nov 14, 2023
1 parent 6f7a368 commit 5a2aa94
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions inspirehep/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
"""This feature flag will prevent to send a ``replace`` update to legacy."""
FEATURE_FLAG_USE_ROOT_TABLE_ON_HEP = False
FEATURE_FLAG_ENABLE_SNOW = False
FEATURE_FLAG_ENABLE_SAVE_WORFLOW_ON_DOWNLOAD_DOCUMENTS = True
# Default language and timezone
# =============================
BABEL_DEFAULT_LANGUAGE = 'en'
Expand Down
3 changes: 2 additions & 1 deletion inspirehep/modules/workflows/tasks/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,8 @@ def download_documents(obj, eng):
obj.log.error(
'Cannot download document from %s', url)
delete_empty_key(obj, 'documents')
save_workflow(obj, eng)
if current_app.config['FEATURE_FLAG_ENABLE_SAVE_WORFLOW_ON_DOWNLOAD_DOCUMENTS']:
save_workflow(obj, eng)
LOGGER.info('Documents downloaded: %s', len(obj.data.get('documents', [])))


Expand Down

0 comments on commit 5a2aa94

Please sign in to comment.