fix(agent): fail closed on incident read drift
Some checks failed
CD Pipeline / workflow-shape (push) Successful in 0s
CD Pipeline / cancel-stale-cd (push) Has been skipped
CD Pipeline / tests (push) Successful in 2m31s
CD Pipeline / post-deploy-checks (push) Has been cancelled
CD Pipeline / build-and-deploy (push) Has been cancelled
Some checks failed
CD Pipeline / workflow-shape (push) Successful in 0s
CD Pipeline / cancel-stale-cd (push) Has been skipped
CD Pipeline / tests (push) Successful in 2m31s
CD Pipeline / post-deploy-checks (push) Has been cancelled
CD Pipeline / build-and-deploy (push) Has been cancelled
This commit is contained in:
@@ -66,8 +66,12 @@ async def init_redis_pool() -> redis.Redis:
|
||||
"redis_pool_initialized",
|
||||
url=settings.REDIS_URL.split("@")[-1], # 隱藏密碼
|
||||
)
|
||||
except redis.ConnectionError as e:
|
||||
except Exception as e:
|
||||
logger.error("redis_connection_failed", error=str(e))
|
||||
failed_pool = _redis_pool
|
||||
_redis_pool = None
|
||||
if failed_pool is not None:
|
||||
await failed_pool.close()
|
||||
raise
|
||||
|
||||
return _redis_pool
|
||||
|
||||
Reference in New Issue
Block a user