Skip to content

Commit

Permalink
account for records that were created and updated since last export
Browse files Browse the repository at this point in the history
  • Loading branch information
jbukhari committed Jul 25, 2024
1 parent 043be05 commit 05c328a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions dlx_dl/scripts/sync/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,13 +198,15 @@ def run(**kwargs):
if callback_data['results'][0]['success'] == False:
# the last export was exported succesfully, but failed on import to DL. proceed with export
pass
else:
elif flag == 'NEW':
# the last export has been imported to DL but is awaiting search indexing
print(f'last new record has been imported to DL but is awaiting search indexing ({flag}) ({args.type}# {last_exported["record_id"]} @ {last_exported["time"]})')
print(f'Last new record has been imported to DL but is awaiting search indexing ({flag}) ({args.type}# {last_exported["record_id"]} @ {last_exported["time"]})')
exit()
else:
raise Exception('This shouldn\'t be possible')
else:
# the last export has not been imported by DL yet
print(f'last update not cleared in DL yet ({flag}) ({args.type}# {last_exported["record_id"]} @ {last_exported["time"]})')
print(f'Last update not cleared in DL yet ({flag}) ({args.type}# {last_exported["record_id"]} @ {last_exported["time"]})')
exit()

# cycle through records in batches
Expand Down

0 comments on commit 05c328a

Please sign in to comment.