1 # This file is part of Wolne Lektury, licensed under GNU Affero GPLv3 or later.
2 # Copyright © Fundacja Wolne Lektury. See NOTICE for more information.
4 from celery.signals import task_postrun
5 from waiter.models import WaitedFile
8 def task_delete_after(task_id=None, **kwargs):
9 WaitedFile.objects.filter(task_id=task_id).delete()
10 task_postrun.connect(task_delete_after)