File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# -*- coding: utf-8 -*-
22"""Location: ./mcpgateway/plugins/__init__.py
3- Copyright contributors to the MCP-CONTEXT-FORGE project
3+ Copyright 2026
44SPDX-License-Identifier: Apache-2.0
5+ Authors: Fred Araujo
56
67Gateway plugin integration.
78
@@ -498,14 +499,14 @@ async def _plugin_invalidation_listener() -> None:
498499 await asyncio .sleep (10 )
499500 continue
500501
501- pubsub = client .pubsub ()
502- await pubsub .subscribe (_REDIS_INVALIDATION_CHANNEL )
503- _logger .info ("Plugin invalidation listener subscribed to %s" , _REDIS_INVALIDATION_CHANNEL )
504- backoff = 1.0
505- consecutive_failures = 0
502+ async with client .pubsub () as pubsub :
503+ await pubsub .subscribe (_REDIS_INVALIDATION_CHANNEL )
504+ _logger .info ("Plugin invalidation listener subscribed to %s" , _REDIS_INVALIDATION_CHANNEL )
505+ backoff = 1.0
506+ consecutive_failures = 0
506507
507- async for message in pubsub .listen ():
508- await _handle_invalidation_message (message )
508+ async for message in pubsub .listen ():
509+ await _handle_invalidation_message (message )
509510
510511 except asyncio .CancelledError :
511512 _logger .info ("Plugin invalidation listener cancelled" )
You can’t perform that action at this time.
0 commit comments