start prometheus before block processing

This commit is contained in:
Jack Robison 2021-01-21 16:01:33 -05:00
parent e9c7cf6f63
commit f7a380e9b7
No known key found for this signature in database
GPG key ID: DF25C68FE0239BB2

View file

@ -110,11 +110,11 @@ class Server:
self.cancellable_tasks.append(asyncio.ensure_future(run(*args, _flag))) self.cancellable_tasks.append(asyncio.ensure_future(run(*args, _flag)))
return _flag.wait() return _flag.wait()
await self.start_prometheus()
await _start_cancellable(self.bp.fetch_and_process_blocks) await _start_cancellable(self.bp.fetch_and_process_blocks)
await self.db.populate_header_merkle_cache() await self.db.populate_header_merkle_cache()
await _start_cancellable(self.mempool.keep_synchronized) await _start_cancellable(self.mempool.keep_synchronized)
await _start_cancellable(self.session_mgr.serve, self.notifications) await _start_cancellable(self.session_mgr.serve, self.notifications)
await self.start_prometheus()
async def stop(self): async def stop(self):
for task in reversed(self.cancellable_tasks): for task in reversed(self.cancellable_tasks):