@app.task(ignore_result=True)
def task_delete_stale_uploads():
    logger.info('Executing')

    for expired_upload in SharedUploadedFile.objects.filter(datetime__lt=now() - timedelta(seconds=UPLOAD_EXPIRATION_INTERVAL)):
        expired_upload.delete()

    logger.info('Finshed')
dataset/ETHPy150Open mayan-edms/mayan-edms/mayan/apps/common/tasks.py/task_delete_stale_uploads/original