fix tests

This commit is contained in:
Jack Robison 2022-02-01 13:01:10 -05:00
parent 6b2d4175be
commit 46ce175481
No known key found for this signature in database
GPG key ID: DF25C68FE0239BB2

View file

@ -214,9 +214,10 @@ class BlockchainReaderServer(BlockchainReader):
async def stop(self):
self.status_server.stop()
async with self._lock:
for task in reversed(self.cancellable_tasks):
task.cancel()
await asyncio.wait(self.cancellable_tasks)
while self.cancellable_tasks:
t = self.cancellable_tasks.pop()
if not t.done():
t.cancel()
self.session_manager.search_index.stop()
self.db.close()
if self.prometheus_server: