async def run(self) -> int:
    try:
        (await self.pyre_manager.ensure_task_running())
        (await self.pyre_query_manager.ensure_task_running())
        return (await self._run())
    finally:
        (await self.pyre_manager.ensure_task_stop())
        (await self.pyre_query_manager.ensure_task_stop())
async def run(self) -> int:
    try:
        (await self.pyre_manager.ensure_task_running())
        (await self.pyre_query_manager.ensure_task_running())
        return (await self._run())
    finally:
        (await self.pyre_manager.ensure_task_stop())
        (await self.pyre_query_manager.ensure_task_stop())