Skip to content

Commit

Permalink
remove extra transaction
Browse files Browse the repository at this point in the history
remove entire kwarg

add commit
  • Loading branch information
zzstoatzz committed Jan 23, 2025
1 parent 901fb27 commit 8ddf45f
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 8ddf45f

Please sign in to comment.