Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -391,16 +391,18 @@ public async Task ProcessCommands(DateTimeOffset asOf, Func<ScheduledCommand, Ta
{
var cursor = db.Set<PersistedScheduledCommand>()
.Where(x => x.ExecuteTime < asOf.UtcDateTime.Ticks)
.AsAsyncEnumerable();
.AsEnumerable();

await foreach (var command in cursor)
foreach (var command in cursor)
{
try
{
await action(command.ToScheduledCommand());
using var db2 = ConstructDbContext();
db2.Set<PersistedScheduledCommand>().Remove(command);
await db2.SaveChangesAsync();
using (var db2 = ConstructDbContext())
{
db2.Set<PersistedScheduledCommand>().Remove(command);
await db2.SaveChangesAsync();
}
}
catch (Exception)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<AssemblyTitle>Workflow Core EntityFramework Core Persistence Provider</AssemblyTitle>
<Authors>Daniel Gerlag</Authors>
<TargetFrameworks>netstandard2.1;net6.0</TargetFrameworks>
<TargetFrameworks>netstandard2.0;net6.0</TargetFrameworks>
<AssemblyName>WorkflowCore.Persistence.EntityFramework</AssemblyName>
<PackageId>WorkflowCore.Persistence.EntityFramework</PackageId>
<PackageTags>workflow;.NET;Core;state machine;WorkflowCore;EntityFramework;EntityFrameworkCore</PackageTags>
Expand All @@ -25,7 +25,7 @@
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="6.0.3" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.1' ">
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="3.1.2" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="3.1.2" />
</ItemGroup>
Expand Down