mirror of
https://github.com/pretix/pretix.git
synced 2026-05-09 15:54:03 +00:00
Run sync job as soon as possible on clicking "Sync now" (#5526)
This commit is contained in:
@@ -78,8 +78,8 @@ class ControlSyncJob(OrderView):
|
|||||||
prov, meta = datasync_providers.get(active_in=self.request.event, identifier=provider)
|
prov, meta = datasync_providers.get(active_in=self.request.event, identifier=provider)
|
||||||
|
|
||||||
if self.request.POST.get("queue_sync") == "true":
|
if self.request.POST.get("queue_sync") == "true":
|
||||||
prov.enqueue_order(self.order, 'user')
|
prov.enqueue_order(self.order, 'user', immediate=True)
|
||||||
messages.success(self.request, _('The sync job has been enqueued and will run in the next minutes.'))
|
messages.success(self.request, _('The sync job has been set to run as soon as possible.'))
|
||||||
elif self.request.POST.get("cancel_job"):
|
elif self.request.POST.get("cancel_job"):
|
||||||
with transaction.atomic():
|
with transaction.atomic():
|
||||||
try:
|
try:
|
||||||
|
|||||||
Reference in New Issue
Block a user