diff --git a/pwnagotchi/agent.py b/pwnagotchi/agent.py index 29bc5db8..9469fd0e 100644 --- a/pwnagotchi/agent.py +++ b/pwnagotchi/agent.py @@ -390,7 +390,7 @@ class Agent(Client, Automata, AsyncAdvertiser, AsyncTrainer): def start_event_polling(self): # start a thread and pass in the mainloop #_thread.start_new_thread(self._event_poller, (asyncio.get_event_loop(),)) - threading.Thread(target=self._event_poller, args=(asyncio.get_event_loop(),), name="Event Polling", daemon=True) + threading.Thread(target=self._event_poller, args=(asyncio.get_event_loop(),), name="Event Polling", daemon=True).start() def is_module_running(self, module): s = self.session() diff --git a/pwnagotchi/ai/train.py b/pwnagotchi/ai/train.py index a0d7056b..ae433bfd 100644 --- a/pwnagotchi/ai/train.py +++ b/pwnagotchi/ai/train.py @@ -1,4 +1,4 @@ -import _thread +# import _thread import threading import time import random @@ -112,7 +112,7 @@ class AsyncTrainer(object): def start_ai(self): #_thread.start_new_thread(self._ai_worker, ()) - threading.Thread(target=self._ai_worker, args=(), name="AI Worker" daemon=True).start() + threading.Thread(target=self._ai_worker, args=(), name="AI Worker", daemon=True).start() def _save_ai(self): logging.info("[AI] saving model to %s ..." % self._nn_path)