diff --git a/src/client_handler.py b/src/client_handler.py index 81d890f..1efa26d 100644 --- a/src/client_handler.py +++ b/src/client_handler.py @@ -143,9 +143,7 @@ async def polling(self) -> None: except asyncio.CancelledError: return except UnauthorizedError as error: - client_handler_errors_metric.labels( - type=type(error).__name__ - ).inc() + client_handler_errors_metric.labels(type=type(error).__name__).inc() log.info(f"session for {self.context.samoware_login} expired") samoware_password = self.db.get_password(self.context.telegram_id) if samoware_password is None: @@ -166,9 +164,7 @@ async def polling(self) -> None: log.warning( f"retry_count={retry_count}. ClientOSError. Probably Broken pipe. Retrying in {HTTP_RETRY_DELAY_SEC} seconds. {str(error)}" ) - client_handler_errors_metric.labels( - type=type(error).__name__ - ).inc() + client_handler_errors_metric.labels(type=type(error).__name__).inc() retry_count += 1 await asyncio.sleep(HTTP_RETRY_DELAY_SEC) except Exception as error: @@ -176,9 +172,7 @@ async def polling(self) -> None: log.warning( f"retry_count={retry_count}. Retrying longpolling for {self.context.samoware_login} in {HTTP_RETRY_DELAY_SEC} seconds..." ) - client_handler_errors_metric.labels( - type=type(error).__name__ - ).inc() + client_handler_errors_metric.labels(type=type(error).__name__).inc() retry_count += 1 await asyncio.sleep(HTTP_RETRY_DELAY_SEC) finally: