fix(workbench): serialize events and target work order sync
This commit is contained in:
@@ -9,6 +9,7 @@ from psycopg.types.json import Jsonb
|
||||
from uuid import uuid4
|
||||
|
||||
from app.domain.domain_errors import DomainError
|
||||
from app.infra.db.postgresql.workbench_events import lock_event_transaction
|
||||
|
||||
|
||||
class TaskAlertRepository:
|
||||
@@ -20,6 +21,7 @@ class TaskAlertRepository:
|
||||
async def transaction(self):
|
||||
try:
|
||||
async with self.connection.transaction():
|
||||
await lock_event_transaction(self.connection)
|
||||
yield self
|
||||
except UndefinedTable as exc:
|
||||
raise DomainError(
|
||||
|
||||
Reference in New Issue
Block a user