recordtransfer.jobs - Background Tasks and Jobs

Each function in the jobs.py file is a django_rq.job, meaning that these functions are meant to run asynchronously with a Redis server.

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

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.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.