log a ton start/stop sequence
This is temporary: sometimes it gets stuck into stop() (I think?) so I'm adding some debug prints everywhere so every instance can be used to spot this issue
This commit is contained in:
parent
bbe668bcec
commit
fdfe71b481
1 changed files with 7 additions and 0 deletions
|
@ -136,9 +136,11 @@ class Treepuncher(
|
||||||
await super().start()
|
await super().start()
|
||||||
|
|
||||||
await self.notifier.start()
|
await self.notifier.start()
|
||||||
|
self.logger.debug("Notifier started")
|
||||||
await asyncio.gather(
|
await asyncio.gather(
|
||||||
*(m.initialize() for m in self.modules)
|
*(m.initialize() for m in self.modules)
|
||||||
)
|
)
|
||||||
|
self.logger.debug("Addons initialized")
|
||||||
self._processing = True
|
self._processing = True
|
||||||
self._worker = asyncio.get_event_loop().create_task(self._work())
|
self._worker = asyncio.get_event_loop().create_task(self._work())
|
||||||
self.scheduler.resume()
|
self.scheduler.resume()
|
||||||
|
@ -152,10 +154,13 @@ class Treepuncher(
|
||||||
await self.dispatcher.disconnect(block=not force)
|
await self.dispatcher.disconnect(block=not force)
|
||||||
if not force:
|
if not force:
|
||||||
await self._worker
|
await self._worker
|
||||||
|
self.logger.debug("Joined worker")
|
||||||
await self.join_callbacks()
|
await self.join_callbacks()
|
||||||
|
self.logger.debug("Joined callbacks")
|
||||||
await asyncio.gather(
|
await asyncio.gather(
|
||||||
*(m.cleanup() for m in self.modules)
|
*(m.cleanup() for m in self.modules)
|
||||||
)
|
)
|
||||||
|
self.logger.debug("Cleaned up addons")
|
||||||
await super().stop()
|
await super().stop()
|
||||||
self.logger.info("Treepuncher stopped")
|
self.logger.info("Treepuncher stopped")
|
||||||
|
|
||||||
|
@ -170,6 +175,7 @@ class Treepuncher(
|
||||||
return m
|
return m
|
||||||
|
|
||||||
async def _work(self):
|
async def _work(self):
|
||||||
|
self.logger.debug("Worker started")
|
||||||
try:
|
try:
|
||||||
if "force_proto" in self.cfg:
|
if "force_proto" in self.cfg:
|
||||||
self.dispatcher.set_proto(self.cfg.getint('force_proto'))
|
self.dispatcher.set_proto(self.cfg.getint('force_proto'))
|
||||||
|
@ -200,3 +206,4 @@ class Treepuncher(
|
||||||
|
|
||||||
if self._processing:
|
if self._processing:
|
||||||
await self.stop(force=True)
|
await self.stop(force=True)
|
||||||
|
self.logger.debug("Worker finished")
|
||||||
|
|
Loading…
Reference in a new issue