Ignoring not existent harvest sources in harvest_sources_job_history_clear

Ignoring not existent harvest sources harvest_sources_job_history_clear because of a possibly corrupt search index.
This commit is contained in:
seitenbau-govdata 2016-11-15 23:36:11 +01:00 committed by GitHub
parent f68bf323f0
commit 95d0c1ca41
1 changed files with 7 additions and 2 deletions

View File

@ -241,8 +241,13 @@ def harvest_sources_job_history_clear(context, data_dict):
harvest_packages = result['results']
if harvest_packages:
for data_dict in harvest_packages:
try:
clear_result = get_action('harvest_source_job_history_clear')(context, {'id': data_dict['id']})
job_history_clear_results.append(clear_result)
except NotFound:
# Ignoring not existent harvest sources because of a possibly corrupt search index
# Logging was already done in called function
pass
return job_history_clear_results