diff --git a/inbox.py b/inbox.py index 4a088dce4..2fc127579 100644 --- a/inbox.py +++ b/inbox.py @@ -1140,13 +1140,14 @@ def runInboxQueueWatchdog(projectVersion: str,httpd) -> None: """This tries to keep the inbox thread running even if it dies """ print('Starting inbox queue watchdog') - inboxQueueOriginal=httpd.thrInboxQueue.clone() + inboxQueueOriginal=httpd.thrInboxQueue.clone(runInboxQueue) + #httpd.thrInboxQueue=inboxQueueOriginal httpd.thrInboxQueue.start() while True: time.sleep(20) if not httpd.thrInboxQueue.isAlive(): httpd.thrInboxQueue.kill() - httpd.thrInboxQueue=inboxQueueOriginal.clone() + httpd.thrInboxQueue=inboxQueueOriginal.clone(runInboxQueue) httpd.thrInboxQueue.start() print('Restarting inbox queue...') diff --git a/threads.py b/threads.py index 2f7fe20b0..07fbc176c 100644 --- a/threads.py +++ b/threads.py @@ -42,6 +42,7 @@ class threadWithTrace(threading.Thread): def kill(self): self.killed = True - def clone(self): - return threadWithTrace(target=self, \ - args=(self._args),daemon=True) + def clone(self,fn): + return threadWithTrace(target=fn, \ + args=self._args, \ + daemon=True)