I was investigating a case where an upload is not deleted while it belongs to a post that has been deleted over 48 hours ago.
But … neither the CleanUpUploads job nor the soft deletion code for a post seem to handle this case ?
The job checks for pu.upload_id IS NULL but while an Upload has has_many :post_uploads, dependent: :destroy , a Post does not have this cascading delete?
What am I overlooking? Or is this really not handled?