Skip to content

Commit

Permalink
No transaction in TaskRunRecorder (#16829)
Browse files Browse the repository at this point in the history
  • Loading branch information
zzstoatzz authored Jan 23, 2025
1 parent 753ae01 commit 525dfb8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/prefect/server/services/task_run_recorder.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,12 +161,13 @@ async def record_task_run_event(event: ReceivedEvent) -> None:
}

db = provide_database_interface()
async with db.session_context(begin_transaction=True) as session:
async with db.session_context() as session:
await _insert_task_run(session, task_run, task_run_attributes)
await _insert_task_run_state(session, task_run)
await _update_task_run_with_state(
session, task_run, denormalized_state_attributes
)
await session.commit()

logger.debug(
"Recorded task run state change",
Expand Down

0 comments on commit 525dfb8

Please sign in to comment.