summaryrefslogtreecommitdiffstats
path: root/module/Scheduler.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/Scheduler.py')
-rw-r--r--module/Scheduler.py15
1 files changed, 2 insertions, 13 deletions
diff --git a/module/Scheduler.py b/module/Scheduler.py
index 8c43ebae8..018b94e10 100644
--- a/module/Scheduler.py
+++ b/module/Scheduler.py
@@ -21,23 +21,12 @@ from time import sleep
from Queue import Queue
from threading import Thread
-class Scheduler(Thread):
+class Scheduler():
def __init__(self, core):
- Thread.__init__(self)
self.core = core
self.queue = Queue()
- def run(self):
- while True:
- j = self.queue.get()
- if j.call == "quit":
- break
- j.start()
-
- def stop(self):
- self.queue.put(Job(0, "quit"))
-
def addJob(self, time, call, args=[], kwargs={}, done=None):
j = Job(time, call, args, kwargs, done)
self.queue.put(j)
@@ -46,7 +35,7 @@ class Job(Thread):
def __init__(self, time, call, args=[], kwargs={}, done=None):
Thread.__init__(self)
self.time = float(time)
- self.interval = 0.2
+ self.interval = 0.5
self.call = call
self.done = done
self.args = args