fix(backend): install_gitlab_webhooks.py is not functioning as expected (#12185)

This commit is contained in:
Hiep Le
2025-12-29 23:27:31 +07:00
committed by GitHub
parent d3afbfa447
commit 2cf6494773

View File

@@ -5,7 +5,7 @@ from uuid import uuid4
from integrations.types import GitLabResourceType
from integrations.utils import GITLAB_WEBHOOK_URL
from sqlalchemy import text
from storage.database import session_maker
from storage.database import a_session_maker
from storage.gitlab_webhook import GitlabWebhook, WebhookStatus
from storage.gitlab_webhook_store import GitlabWebhookStore
@@ -262,7 +262,7 @@ class VerifyWebhookStatus:
# Check if the table exists before proceeding
# This handles cases where the CronJob runs before database migrations complete
with session_maker() as session:
async with a_session_maker() as session:
query = text("""
SELECT EXISTS (
SELECT FROM information_schema.tables