mirror of
https://github.com/pretix/pretix.git
synced 2026-05-06 15:24:02 +00:00
Make sync_single task transaction-aware (#5541)
This commit is contained in:
@@ -32,6 +32,7 @@ from django_scopes import scope, scopes_disabled
|
||||
|
||||
from pretix.base.datasync.datasync import datasync_providers
|
||||
from pretix.base.models.datasync import OrderSyncQueue
|
||||
from pretix.base.services.tasks import TransactionAwareTask
|
||||
from pretix.base.signals import periodic_task
|
||||
from pretix.celery_app import app
|
||||
|
||||
@@ -89,7 +90,7 @@ def sync_all():
|
||||
run_sync(queue)
|
||||
|
||||
|
||||
@app.task()
|
||||
@app.task(base=TransactionAwareTask)
|
||||
def sync_single(queue_item_id: int):
|
||||
with scopes_disabled():
|
||||
queue = (
|
||||
|
||||
Reference in New Issue
Block a user