Skip to content

Commit 2dc5657

Browse files
committed
Revert "Add more logs"
This reverts commit 21ab8bf33d3c2714b8c7af2da8036fe8baae20ea.
1 parent eb216a5 commit 2dc5657

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

src/galaxy/api/jsonrpc.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,9 @@ async def run(self):
129129
await asyncio.sleep(0) # To not starve task queue
130130

131131
def close(self):
132-
logging.info("Closing JSON-RPC server - not more messages will be read")
133-
self._active = False
132+
if self._active:
133+
logging.info("Closing JSON-RPC server - not more messages will be read")
134+
self._active = False
134135

135136
async def wait_closed(self):
136137
await self._task_manager.wait()
@@ -281,6 +282,7 @@ def notify(self, method, params, sensitive_params=False):
281282
self._send(notification)
282283

283284
async def close(self):
285+
self._task_manager.cancel()
284286
await self._task_manager.wait()
285287

286288
def _send(self, data):

src/galaxy/api/plugin.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,7 @@ async def wrapper(*args, **kwargs):
184184
async def run(self):
185185
"""Plugin's main coroutine."""
186186
await self._server.run()
187+
logging.debug("Plugin run loop finished")
187188

188189
def close(self) -> None:
189190
if not self._active:
@@ -196,10 +197,12 @@ def close(self) -> None:
196197
self._active = False
197198

198199
async def wait_closed(self) -> None:
200+
logging.debug("Waiting for plugin to close")
199201
await self._external_task_manager.wait()
200202
await self._internal_task_manager.wait()
201203
await self._server.wait_closed()
202204
await self._notification_client.close()
205+
logging.debug("Plugin closed")
203206

204207
def create_task(self, coro, description):
205208
"""Wrapper around asyncio.create_task - takes care of canceling tasks on shutdown"""

0 commit comments

Comments
 (0)