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)
|
||||
if obj != Addon and inspect.isclass(obj) and issubclass(obj, Addon):
|
||||
addons.append(obj)
|
||||
break
|
||||
|
||||
help_text = '\n\naddons:'
|
||||
|
||||
|
|
|
@ -207,7 +207,6 @@ class Treepuncher(
|
|||
await super().start()
|
||||
if not self.notifier:
|
||||
self.notifier = Notifier()
|
||||
await self.notifier.initialize()
|
||||
for m in self.modules:
|
||||
await m.initialize()
|
||||
self._processing = True
|
||||
|
@ -225,8 +224,6 @@ class Treepuncher(
|
|||
await self.join_callbacks()
|
||||
for m in self.modules:
|
||||
await m.cleanup()
|
||||
if self.notifier:
|
||||
await self.notifier.cleanup()
|
||||
await super().stop()
|
||||
self.logger.info("Treepuncher stopped")
|
||||
|
||||
|
|
Loading…
Reference in a new issue