Skip to content

Cleanup stale File objects during the garbage collection job #3533

@rtibbles

Description

@rtibbles

Whenever the file upload URL endpoint is accessed, it creates an entry in the File table for that file. As this generally happens prior to the creation of a ContentNode or AssessmentItem associated with this file, if no ContentNode or AssessmentItem are created, then this can leave a File object that is not attached to any specific object.

This has been exacerbated by the recent usage of the same endpoint by ricecooker to avoid doing file uploads via the Studio app server.

To resolve this, we should add cleanup of File objects to the garbage collection utilities.

Acceptance criteria:

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions