Private GIT

Skip to content
Snippets Groups Projects
Commit 7f1761fc authored by Dustyn Gibson's avatar Dustyn Gibson
Browse files

This commit was lost from cherryPy->Tornado switch, and an addition by me -...

This commit was lost from cherryPy->Tornado switch, and an addition by me - fixes SiCKRAGETV/sickrage-issues#2045
parent 2c562558
No related merge requests found
......@@ -50,13 +50,14 @@ class GenericQueue(object):
self.min_priority = 0
def add_item(self, item):
with self.lock:
item.added = datetime.datetime.now()
self.queue.append(item)
return item
def run(self, force=False):
with self.lock:
# only start a new task if one isn't already going
if self.currentItem is None or not self.currentItem.isAlive():
......@@ -92,6 +93,8 @@ class GenericQueue(object):
self.currentItem.name = self.queue_name + '-' + self.currentItem.name
self.currentItem.start()
self.amActive = False
class QueueItem(threading.Thread):
def __init__(self, name, action_id=0):
super(QueueItem, self).__init__()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment