Compare commits

...

2 Commits

Author SHA1 Message Date
Bai
0d16879d26 perf: Sticky 2024-10-24 14:29:38 +08:00
feng
4b981fd93c fix: Error subpub_msg log 2024-10-17 15:17:12 +08:00
2 changed files with 4 additions and 3 deletions

View File

@@ -47,7 +47,7 @@ class Subscription:
self.ch = pb.ch
self.sub = sub
self.unsubscribed = False
logger.info("Subscribed to channel: ", sub)
logger.info(f"Subscribed to channel: {sub}")
def _handle_msg(self, _next, error, complete):
"""
@@ -106,11 +106,11 @@ class Subscription:
def unsubscribe(self):
self.unsubscribed = True
logger.info("Unsubscribed from channel: ", self.sub)
logger.info(f"Unsubscribed from channel: {self.sub}")
try:
self.sub.close()
except Exception as e:
logger.warning('Unsubscribe msg error: {}'.format(e))
logger.warning(f'Unsubscribe msg error: {e}')
def retry(self, _next, error, complete):
logger.info('Retry subscribe channel: {}'.format(self.ch))

View File

@@ -20,3 +20,4 @@ def get_current_request():
current_request = LocalProxy(partial(_find, 'current_request'))