don't initialize notifier multiple times
This commit is contained in:
parent
6813181800
commit
148c809628
2 changed files with 1 additions and 3 deletions
|
@ -30,6 +30,7 @@ def main():
|
||||||
obj = getattr(m, obj_name)
|
obj = getattr(m, obj_name)
|
||||||
if obj != Addon and inspect.isclass(obj) and issubclass(obj, Addon):
|
if obj != Addon and inspect.isclass(obj) and issubclass(obj, Addon):
|
||||||
addons.append(obj)
|
addons.append(obj)
|
||||||
|
break
|
||||||
|
|
||||||
help_text = '\n\naddons:'
|
help_text = '\n\naddons:'
|
||||||
|
|
||||||
|
|
|
@ -207,7 +207,6 @@ class Treepuncher(
|
||||||
await super().start()
|
await super().start()
|
||||||
if not self.notifier:
|
if not self.notifier:
|
||||||
self.notifier = Notifier()
|
self.notifier = Notifier()
|
||||||
await self.notifier.initialize()
|
|
||||||
for m in self.modules:
|
for m in self.modules:
|
||||||
await m.initialize()
|
await m.initialize()
|
||||||
self._processing = True
|
self._processing = True
|
||||||
|
@ -225,8 +224,6 @@ class Treepuncher(
|
||||||
await self.join_callbacks()
|
await self.join_callbacks()
|
||||||
for m in self.modules:
|
for m in self.modules:
|
||||||
await m.cleanup()
|
await m.cleanup()
|
||||||
if self.notifier:
|
|
||||||
await self.notifier.cleanup()
|
|
||||||
await super().stop()
|
await super().stop()
|
||||||
self.logger.info("Treepuncher stopped")
|
self.logger.info("Treepuncher stopped")
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue