π OpenHands: AI-Driven Development
fix(backend): install_gitlab_webhooks.py is not functioning as expected (#12185)
Hiep Le2cf64947739c
diff --git a/enterprise/sync/install_gitlab_webhooks.py b/enterprise/sync/install_gitlab_webhooks.pyindex 5988879389..8f274bf81c 100644--- a/enterprise/sync/install_gitlab_webhooks.py+++ b/enterprise/sync/install_gitlab_webhooks.py@@ -5,7 +5,7 @@ from uuid import uuid4from integrations.types import GitLabResourceTypefrom integrations.utils import GITLAB_WEBHOOK_URLfrom sqlalchemy import text-from storage.database import session_maker+from storage.database import a_session_makerfrom storage.gitlab_webhook import GitlabWebhook, WebhookStatusfrom 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