mirror of
https://github.com/pretix/pretix.git
synced 2026-05-04 15:04:03 +00:00
Notification queues: Optimize order for less queries (#5512)
* Notification queues: Optimize order for less queries * Update src/pretix/api/webhooks.py Co-authored-by: luelista <weller@rami.io> --------- Co-authored-by: luelista <weller@rami.io>
This commit is contained in:
@@ -41,7 +41,11 @@ def notify(logentry_ids: list):
|
||||
if not isinstance(logentry_ids, list):
|
||||
logentry_ids = [logentry_ids]
|
||||
|
||||
qs = LogEntry.all.select_related('event', 'event__organizer').filter(id__in=logentry_ids)
|
||||
qs = LogEntry.all.select_related(
|
||||
'event', 'event__organizer'
|
||||
).order_by(
|
||||
'action_type', 'event_id',
|
||||
).filter(id__in=logentry_ids)
|
||||
|
||||
_event, _at, notify_specific, notify_global = None, None, None, None
|
||||
for logentry in qs:
|
||||
|
||||
Reference in New Issue
Block a user