Skip to content

Commit

Permalink
Fix mongodb index for GetRunnableInstances
Browse files Browse the repository at this point in the history
  • Loading branch information
glucaci committed Nov 22, 2022
1 parent 97974b2 commit 0908116
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,10 @@ static void CreateIndexes(MongoPersistenceProvider instance)
if (!indexesCreated)
{
instance.WorkflowInstances.Indexes.CreateOne(new CreateIndexModel<WorkflowInstance>(
Builders<WorkflowInstance>.IndexKeys.Ascending(x => x.NextExecution),
new CreateIndexOptions {Background = true, Name = "idx_nextExec"}));
Builders<WorkflowInstance>.IndexKeys
.Ascending(x => x.NextExecution)
.Ascending(x => x.Status),
new CreateIndexOptions {Background = true, Name = "idx_nextExec_v2"}));

instance.Events.Indexes.CreateOne(new CreateIndexModel<Event>(
Builders<Event>.IndexKeys.Ascending(x => x.IsProcessed),
Expand Down

0 comments on commit 0908116

Please sign in to comment.