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