fix(alerts): close controlled canary lifecycle
All checks were successful
CD Pipeline / workflow-shape (push) Successful in 0s
CD Pipeline / cancel-stale-cd (push) Has been skipped
CD Pipeline / tests (push) Successful in 2m33s
CD Pipeline / build-and-deploy (push) Successful in 6m43s
CD Pipeline / post-deploy-checks (push) Successful in 1m48s
AWOOOI Harbor 110 Local Repair / workflow-shape (push) Successful in 1s
AWOOOI Harbor 110 Local Repair / harbor-110-local-repair (push) Successful in 50s
All checks were successful
CD Pipeline / workflow-shape (push) Successful in 0s
CD Pipeline / cancel-stale-cd (push) Has been skipped
CD Pipeline / tests (push) Successful in 2m33s
CD Pipeline / build-and-deploy (push) Successful in 6m43s
CD Pipeline / post-deploy-checks (push) Successful in 1m48s
AWOOOI Harbor 110 Local Repair / workflow-shape (push) Successful in 1s
AWOOOI Harbor 110 Local Repair / harbor-110-local-repair (push) Successful in 50s
This commit is contained in:
@@ -74,6 +74,7 @@ class AlertOperationLogRepository:
|
||||
success: bool | None = None,
|
||||
error_message: str | None = None,
|
||||
context: dict[str, Any] | None = None,
|
||||
project_id: str | None = None,
|
||||
) -> AlertOperationLog | None:
|
||||
"""
|
||||
寫入一筆操作事件
|
||||
@@ -102,7 +103,12 @@ class AlertOperationLogRepository:
|
||||
return None
|
||||
|
||||
try:
|
||||
async with get_db_context() as db:
|
||||
db_context = (
|
||||
get_db_context(project_id)
|
||||
if project_id
|
||||
else get_db_context()
|
||||
)
|
||||
async with db_context as db:
|
||||
record = AlertOperationLog(
|
||||
incident_id=incident_id,
|
||||
approval_id=approval_id,
|
||||
|
||||
Reference in New Issue
Block a user