From 9d050b9edbb812647a5e6f5cb62c327dde237cc6 Mon Sep 17 00:00:00 2001 From: Remy Date: Mon, 23 May 2011 22:36:55 -0700 Subject: [PATCH] fixed priority issue that was preventing daemonization --- headphones.py | 1 + searcher.py | 4 ---- threadtools.py | 5 ++--- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/headphones.py b/headphones.py index 2dd37c2f..3d37d187 100755 --- a/headphones.py +++ b/headphones.py @@ -70,6 +70,7 @@ def serverstart(): {settings['http_username']:settings['http_password']}) }) + if options.daemonize: Daemonizer(cherrypy.engine).subscribe() diff --git a/searcher.py b/searcher.py index 9a157d2f..b8f37b09 100644 --- a/searcher.py +++ b/searcher.py @@ -97,8 +97,4 @@ def searchNZB(albumid=None): conn.commit() c.close() - - - - \ No newline at end of file diff --git a/threadtools.py b/threadtools.py index 44106e43..7c74c3e3 100644 --- a/threadtools.py +++ b/threadtools.py @@ -18,16 +18,15 @@ class threadtool(SimplePlugin): self.thread = threading.Thread(target=self.run) self.thread.start() self.sched.start() + start.priority = 80 def stop(self): self.running = False - print '''Shutting down''' - if self.thread: self.thread.join() self.thread = None - self.running = False self.sched.shutdown() + stop.priority = 10 def run(self): import updater