fix(workbench): serialize events and target work order sync
This commit is contained in:
@@ -4,6 +4,7 @@ from uuid import UUID, uuid4
|
||||
|
||||
from psycopg import AsyncConnection, Connection
|
||||
from psycopg.types.json import Jsonb
|
||||
from app.infra.db.postgresql.workbench_events import lock_event_transaction_sync
|
||||
|
||||
|
||||
class AnalysisRepository:
|
||||
@@ -19,6 +20,7 @@ class AnalysisRepository:
|
||||
parameters: dict[str, Any],
|
||||
run_id: UUID | None = None,
|
||||
) -> dict[str, Any]:
|
||||
lock_event_transaction_sync(conn)
|
||||
execution_id = run_id or uuid4()
|
||||
with conn.cursor() as cur:
|
||||
cur.execute(
|
||||
@@ -54,6 +56,7 @@ class AnalysisRepository:
|
||||
created_by: str,
|
||||
parameters: dict[str, Any],
|
||||
) -> int:
|
||||
lock_event_transaction_sync(conn)
|
||||
with conn.cursor() as cur:
|
||||
cur.execute(
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user