Skip to content

Commit

Permalink
refactor: Make transaction required parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
tomi committed Aug 2, 2024
1 parent faa0482 commit 182b251
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,11 @@ export class ExecutionDataRepository extends Repository<ExecutionData> {

async createExecutionDataForExecution(
executionData: CreateExecutionDataOpts,
trx?: EntityManager,
transactionManager: EntityManager,
) {
trx = trx ?? this.manager;
const { data, executionId, workflowData } = executionData;

return await trx.insert(ExecutionData, {
return await transactionManager.insert(ExecutionData, {
executionId,
data,
workflowData,
Expand Down

0 comments on commit 182b251

Please sign in to comment.