recordtransfer.jobs - Asynchronous jobs

recordtransfer.jobs.create_downloadable_bag(submission: Submission, user_triggered: User) None

Create a zipped BagIt bag that a user can download through a Job.

Parameters:
  • submission (Submission) – The submission to create a BagIt bag for

  • user_triggered (User) – The user who triggered this new Job creation

recordtransfer.jobs.get_expirable_upload_sessions() QuerySet

Get upload sessions that can be expired, that have an in-progress submission attached.

recordtransfer.jobs.get_deletable_upload_sessions() QuerySet

Get upload sessions that can be deleted, and do not have an in-progress submission.

recordtransfer.jobs.move_uploads_and_send_emails(submission: Submission, form_data: dict) None

Move the temp files in the given session to the permanent storage space and send emails.

If there is no upload session, just send emails.

recordtransfer.jobs.cleanup_expired_sessions() None

Clean up UploadSession objects that are expirable. Upload sessions that are not associated with any InProgressSubmission objects are deleted, while those that are associated with InProgressSubmission objects have their uploads removed and are expired.

recordtransfer.jobs.check_expiring_in_progress_submissions() None

Check for in-progress submissions that are about to expire for which reminder emails have not been sent yet, and send email reminders.