Skip to content
Snippets Groups Projects
Commit 3399843a authored by Sybren A. Stüvel's avatar Sybren A. Stüvel
Browse files

Worker: moved scheduling of fetch_task() to startup()

parent 15a4ae4c
No related branches found
No related tags found
No related merge requests found
...@@ -35,6 +35,8 @@ class FlamencoWorker: ...@@ -35,6 +35,8 @@ class FlamencoWorker:
if not self.worker_id or not self.worker_secret: if not self.worker_id or not self.worker_secret:
self.register_at_manager() self.register_at_manager()
self.schedule_fetch_task()
def register_at_manager(self): def register_at_manager(self):
self._log.info('Registering at manager') self._log.info('Registering at manager')
...@@ -70,7 +72,6 @@ class FlamencoWorker: ...@@ -70,7 +72,6 @@ class FlamencoWorker:
# TODO: add "watchdog" task that checks the asyncio loop and ensures there is # TODO: add "watchdog" task that checks the asyncio loop and ensures there is
# always either a task being executed or a task fetch scheduled. # always either a task being executed or a task fetch scheduled.
self.schedule_fetch_task()
self.loop.run_forever() self.loop.run_forever()
def schedule_fetch_task(self, delay=0): def schedule_fetch_task(self, delay=0):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment