mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-10 07:22:37 -07:00
Multithreaded notification queue
This commit is contained in:
parent
82f4c99025
commit
08a8b5fee0
5 changed files with 38 additions and 58 deletions
|
@ -99,8 +99,7 @@ class ActivityProcessor(object):
|
|||
# Check if any notification agents have notifications enabled
|
||||
if notify:
|
||||
values.update({'ip_address': session['ip_address']})
|
||||
plexpy.NOTIFY_QUEUE.put(notification_handler.add_to_queue(
|
||||
stream_data=values, notify_action='on_play'))
|
||||
plexpy.NOTIFY_QUEUE.put({'stream_data': values, 'notify_action': 'on_play'})
|
||||
|
||||
# If it's our first write then time stamp it.
|
||||
started = int(time.time())
|
||||
|
@ -116,10 +115,8 @@ class ActivityProcessor(object):
|
|||
self.db.upsert('sessions', ip_address, keys)
|
||||
|
||||
if notify:
|
||||
plexpy.NOTIFY_QUEUE.put(notification_handler.add_to_queue(
|
||||
stream_data=values, notify_action='on_concurrent'))
|
||||
plexpy.NOTIFY_QUEUE.put(notification_handler.add_to_queue(
|
||||
stream_data=values, notify_action='on_newdevice'))
|
||||
plexpy.NOTIFY_QUEUE.put({'stream_data': values, 'notify_action': 'on_concurrent'})
|
||||
plexpy.NOTIFY_QUEUE.put({'stream_data': values, 'notify_action': 'on_newdevice'})
|
||||
|
||||
return True
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue