Skip to content

Commit

Permalink
style: More log on transfer
Browse files Browse the repository at this point in the history
  • Loading branch information
Alan Christie committed Jan 14, 2025
1 parent 3459c2c commit 8f248a4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions viewer/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -543,17 +543,18 @@ def process_job_file_transfer(auth_token, jt_id):
try:
process_file_transfer(auth_token, job_transfer.id)
except RuntimeError as error:
logger.error('- File transfer (id=%s) [RuntimeError "%s"]', jt_id, error)
job_transfer.transfer_status = "FAILURE"
job_transfer.transfer_datetime = datetime.datetime.now(datetime.timezone.utc)
job_transfer.save()
logger.error('- File transfer (id=%s) [RuntimeError "%s"]', jt_id, error)
else:
# Update the transfer datetime for comparison with the target upload datetime.
# This should only be done on a successful upload.
job_transfer.transfer_datetime = datetime.datetime.now(datetime.timezone.utc)
job_transfer.transfer_progress = 100.00
job_transfer.transfer_status = "SUCCESS"
job_transfer.save()
logger.info('+ File transfer (id=%s) [SUCCESS]', jt_id)
logger.info('- File transfer (id=%s) [SUCCESS]', jt_id)

return job_transfer.transfer_status

Expand Down

0 comments on commit 8f248a4

Please sign in to comment.