mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-11 15:56:07 -07:00
Queue newsletters instead of waiting for send
This commit is contained in:
parent
f810f50ea9
commit
eda0e73eb6
5 changed files with 38 additions and 25 deletions
|
@ -39,6 +39,7 @@ import plextv
|
|||
import pmsconnect
|
||||
import request
|
||||
import users
|
||||
from newsletter_handler import notify as notify_newsletter
|
||||
|
||||
|
||||
def process_queue():
|
||||
|
@ -50,7 +51,9 @@ def process_queue():
|
|||
break
|
||||
elif params:
|
||||
try:
|
||||
if 'notify' in params:
|
||||
if 'newsletter' in params:
|
||||
notify_newsletter(**params)
|
||||
elif 'notification' in params:
|
||||
notify(**params)
|
||||
else:
|
||||
add_notifier_each(**params)
|
||||
|
@ -111,7 +114,7 @@ def add_notifier_each(notifier_id=None, notify_action=None, stream_data=None, ti
|
|||
# Check custom user conditions
|
||||
if manual_trigger or notify_custom_conditions(notifier_id=notifier['id'], parameters=parameters):
|
||||
# Add each notifier to the queue
|
||||
data = {'notify': True,
|
||||
data = {'notification': True,
|
||||
'notifier_id': notifier['id'],
|
||||
'notify_action': notify_action,
|
||||
'stream_data': stream_data,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue