Skip to content

Commit b34690c

Browse files
committed
bug
1 parent 94e70d7 commit b34690c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/providers/WorkflowCore.Persistence.EntityFramework/Services/EntityFrameworkPersistenceProvider.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -398,8 +398,9 @@ public async Task ProcessCommands(DateTimeOffset asOf, Func<ScheduledCommand, Ta
398398
try
399399
{
400400
await action(command.ToScheduledCommand());
401-
db.Set<PersistedScheduledCommand>().Remove(command);
402-
await db.SaveChangesAsync();
401+
using var db2 = ConstructDbContext();
402+
db2.Set<PersistedScheduledCommand>().Remove(command);
403+
await db2.SaveChangesAsync();
403404
}
404405
catch (Exception)
405406
{

0 commit comments

Comments
 (0)