Private GIT

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

Merge branch 'issue-2045' into develop

parents 2c562558 7f1761fc
Branches
Tags
No related merge requests found
...@@ -50,13 +50,14 @@ class GenericQueue(object): ...@@ -50,13 +50,14 @@ class GenericQueue(object):
self.min_priority = 0 self.min_priority = 0
def add_item(self, item): def add_item(self, item):
with self.lock:
item.added = datetime.datetime.now() item.added = datetime.datetime.now()
self.queue.append(item) self.queue.append(item)
return item return item
def run(self, force=False): def run(self, force=False):
with self.lock:
# only start a new task if one isn't already going # only start a new task if one isn't already going
if self.currentItem is None or not self.currentItem.isAlive(): if self.currentItem is None or not self.currentItem.isAlive():
...@@ -92,6 +93,8 @@ class GenericQueue(object): ...@@ -92,6 +93,8 @@ class GenericQueue(object):
self.currentItem.name = self.queue_name + '-' + self.currentItem.name self.currentItem.name = self.queue_name + '-' + self.currentItem.name
self.currentItem.start() self.currentItem.start()
self.amActive = False
class QueueItem(threading.Thread): class QueueItem(threading.Thread):
def __init__(self, name, action_id=0): def __init__(self, name, action_id=0):
super(QueueItem, self).__init__() 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