Skip to content

Commit

Permalink
Actually remove failed imports
Browse files Browse the repository at this point in the history
  • Loading branch information
hllywluis committed Jun 3, 2024
1 parent e14d041 commit f7d966a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/jobs/remove_failed_imports.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ async def remove_failed_imports(settingsDict, BASE_URL, API_KEY, NAME, deleted_d

if queueItem['status'] == 'completed' \
and queueItem['trackedDownloadStatus'] == 'warning' \
and queueItem['trackedDownloadState'] == 'importPending':
and (queueItem['trackedDownloadState'] == 'importPending' or queueItem['trackedDownloadState'] == 'importFailed'):

for statusMessage in queueItem['statusMessages']:
if not settingsDict['FAILED_IMPORT_MESSAGE_PATTERNS'] or any(any(pattern in message for pattern in settingsDict['FAILED_IMPORT_MESSAGE_PATTERNS']) for message in statusMessage.get('messages', [])):
Expand Down

0 comments on commit f7d966a

Please sign in to comment.