From 96aea579ac00bb74ac32fb93f71ae3c0eb6fa54a Mon Sep 17 00:00:00 2001 From: Lex Berezhny Date: Mon, 20 Jul 2020 09:57:52 -0400 Subject: [PATCH] temporary debug print statements --- lbry/cli.py | 3 +++ lbry/service/daemon.py | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/lbry/cli.py b/lbry/cli.py index 2745cc944..64c55eb62 100644 --- a/lbry/cli.py +++ b/lbry/cli.py @@ -221,11 +221,14 @@ def main(argv=None): if args.help: args.start_parser.print_help() elif args.full_node: + print('Instantiating FullNode') service = FullNode(Ledger(conf)) if conf.console == "advanced": console = AdvancedConsole(service) else: + print('Instantiating BasicConsole') console = BasicConsole(service) + print('Daemon(service, console).run()') return Daemon(service, console).run() else: print('Only `start --full-node` is currently supported.') diff --git a/lbry/service/daemon.py b/lbry/service/daemon.py index a96e4d31e..eb4ae9a49 100644 --- a/lbry/service/daemon.py +++ b/lbry/service/daemon.py @@ -97,7 +97,9 @@ class Daemon: pass # Not implemented on Windows try: + print('loop.run_until_complete(self.start())') loop.run_until_complete(self.start()) + print('loop.run_forever()') loop.run_forever() except (GracefulExit, KeyboardInterrupt, asyncio.CancelledError): pass @@ -109,10 +111,15 @@ class Daemon: loop.run_until_complete(loop.shutdown_asyncgens()) async def start(self): + print('self.console.starting()') self.console.starting() + print('await self.runner.setup()') await self.runner.setup() + print('TCPSite(self.runner, self.conf.api_host, self.conf.api_port)') site = TCPSite(self.runner, self.conf.api_host, self.conf.api_port) + print('await site.start()') await site.start() + print('await self.service.start()') await self.service.start() async def stop(self):