You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running the purge_old_user_tasks task, the entries are correctly deleted from database, but the files remain orphan on the file system. The code is simply calling the delete() method on the UserTaskStatus model, which in turn deletes the related UserTaskArtifact models by cascading:
In earlier Django versions, when a model instance containing a FileField was deleted, FileField took it upon itself to also delete the file from the backend storage. This opened the door to several data-loss scenarios, including rolled-back transactions and fields on different models referencing the same file. In Django 1.3, when a model is deleted the FileField’s delete() method won’t be called. If you need cleanup of orphaned files, you’ll need to handle it yourself
The text was updated successfully, but these errors were encountered:
When running the
purge_old_user_tasks
task, the entries are correctly deleted from database, but the files remain orphan on the file system. The code is simply calling thedelete()
method on theUserTaskStatus
model, which in turn deletes the relatedUserTaskArtifact
models by cascading:django-user-tasks/user_tasks/tasks.py
Line 114 in 9e381de
This is most likely related to a change after Django 1.3:
The text was updated successfully, but these errors were encountered: