Set acks_late=True on celery tasks where we would prefer double execution over failure

This commit is contained in:
Raphael Michel
2020-05-19 16:32:45 +02:00
parent 059bdc629e
commit 5dd5ff8a7c
7 changed files with 12 additions and 8 deletions

View File

@@ -9,7 +9,7 @@ from pretix.base.services.tasks import TransactionAwareProfiledEventTask
from pretix.celery_app import app
@app.task(base=TransactionAwareProfiledEventTask)
@app.task(base=TransactionAwareProfiledEventTask, acks_late=True)
def vouchers_send(event: Event, vouchers: list, subject: str, message: str, recipients: list, user: int) -> None:
vouchers = list(Voucher.objects.filter(id__in=vouchers).order_by('id'))
user = User.objects.get(pk=user)