recordtransfer.managers - Model managers for recordtransfer models
- class recordtransfer.managers.UploadSessionManager(*args, **kwargs)
Bases:
ManagerCustom manager for UploadSession model.
- get_expirable() QuerySet
Return all expired upload sessions that can be set to EXPIRED.
A session can be expired if it has not been interacted with in at least UPLOAD_SESSION_EXPIRE_AFTER_INACTIVE_MINUTES minutes. Additionally, the session must be linked to an existing InProgressSubmission.
If a session is not linked to an InProgressSubmission, and matches the same last interaction criteria above, then it will be returned by get_deletable instead.
- get_deletable() QuerySet
Return all upload sessions that can be safely deleted.
An upload session that can be safely deleted matches these criteria: - It has expired (either by checking the last_upload_interaction_time, or the status) - It is not linked to an in-progress submission.
If a session is linked to an InProgressSubmission, and matches the same last interaction criteria above, then it will be returned by get_expirable instead.
- class recordtransfer.managers.InProgressSubmissionManager(*args, **kwargs)
Bases:
ManagerCustom manager for InProgressSubmission model.
- get_expiring_without_reminder() QuerySet
Return all in-progress submissions with upload sessions that are about to expire and have not had a reminder email sent.