Skip to content

Commit

Permalink
Make transaction scope timeout the same as command timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
sebgod committed Jan 16, 2025
1 parent 38a36a3 commit e85e4e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/grate.core/Migration/GrateMigrator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public async Task Migrate()
// Start the transaction, if configured
if (runInTransaction)
{
scope = new TransactionScope(TransactionScopeAsyncFlowOption.Enabled);
scope = new TransactionScope(TransactionScopeOption.Required, TimeSpan.FromSeconds(config.CommandTimeout), TransactionScopeAsyncFlowOption.Enabled);
}

bool exceptionOccured = false;
Expand Down

0 comments on commit e85e4e9

Please sign in to comment.