Commit 78d3a833 authored by echel0n's avatar echel0n

Merge branch 'release/9.4.24'

parents db428352 73acd711
# Changelog
- * 50194ba - 2018-11-09: Release v9.4.23
- * a322835 - 2018-11-09: Release v9.4.24
- * ede2f85 - 2018-11-09: Added threaded event queue. Fixed duplicate notifications.
- * e9ca9af - 2018-11-09: Release v9.4.23
- * 2c4ce80 - 2018-11-09: Fixed location issue with Transmission client.
- * f98b5e8 - 2018-11-08: Release v9.4.22
- * d705db2 - 2018-11-08: Fixed startup issues with systemd init script.
......
......@@ -55,6 +55,7 @@ from sickrage.core.logger import Logger
from sickrage.core.nameparser.validator import check_force_season_folders
from sickrage.core.processors import auto_postprocessor
from sickrage.core.processors.auto_postprocessor import AutoPostProcessor
from sickrage.core.queues.event import EventQueue
from sickrage.core.queues.postprocessor import PostProcessorQueue
from sickrage.core.queues.search import SearchQueue
from sickrage.core.queues.show import ShowQueue
......@@ -136,6 +137,7 @@ class Core(object):
self.show_queue = None
self.search_queue = None
self.postprocessor_queue = None
self.event_queue = None
self.version_updater = None
self.show_updater = None
self.tz_updater = None
......@@ -173,6 +175,7 @@ class Core(object):
self.show_queue = ShowQueue()
self.search_queue = SearchQueue()
self.postprocessor_queue = PostProcessorQueue()
self.event_queue = EventQueue()
self.version_updater = VersionUpdater()
self.show_updater = ShowUpdater()
self.tz_updater = TimeZoneUpdater()
......@@ -464,14 +467,15 @@ class Core(object):
self.search_queue.start()
self.show_queue.start()
self.postprocessor_queue.start()
self.event_queue.start()
# start webserver
self.wserver.start()
# add callbacks
self.io_loop.add_callback(self.version_updater.run)
self.io_loop.add_callback(self.tz_updater.run)
# fire off startup events
self.event_queue.fire_event(self.version_updater.run)
self.event_queue.fire_event(self.tz_updater.run)
# start ioloop
self.io_loop.start()
......@@ -501,6 +505,12 @@ class Core(object):
self.postprocessor_queue.shutdown()
del self.postprocessor_queue
# shutdown event queue
if self.event_queue:
self.log.debug("Shutting down event queue")
self.event_queue.shutdown()
del self.event_queue
# log out of ADBA
if self.adba_connection:
self.log.debug("Shutting down ANIDB connection")
......
# Author: echel0n <[email protected]>
# URL: https://sickrage.ca
#
# This file is part of SickRage.
#
# SickRage is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# SickRage is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with SickRage. If not, see <http://www.gnu.org/licenses/>.
from __future__ import unicode_literals
from sickrage.core.queues import srQueue, srQueueItem
class EventQueue(srQueue):
def __init__(self):
srQueue.__init__(self, "EVENTQUEUE")
def fire_event(self, event, force=False):
return self.put(EventQueueItem(event))
class EventQueueItem(srQueueItem):
"""
Represents an event in the queue waiting to be executed
"""
def __init__(self, event):
super(EventQueueItem, self).__init__('Firing Event')
self.event = event
def run(self):
self.event()
......@@ -18,8 +18,8 @@ class WebSocketUIHandler(WebSocketHandler):
"""Client connected to the WebSocket."""
clients.add(self)
for n in sickrage.app.alerts.get_notifications(self.request.remote_ip):
self.write_message(WebSocketMessage('notification', n.data).json())
#for n in sickrage.app.alerts.get_notifications(self.request.remote_ip):
# self.write_message(WebSocketMessage('notification', n.data).json())
def on_message(self, message):
"""Received a message from the client."""
......
9.4.23
\ No newline at end of file
9.4.24
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment