@@ -95,7 +95,8 @@ static void CreateIndexes(MongoPersistenceProvider instance)
95
95
instance . WorkflowInstances . Indexes . CreateOne ( new CreateIndexModel < WorkflowInstance > (
96
96
Builders < WorkflowInstance > . IndexKeys
97
97
. Ascending ( x => x . NextExecution )
98
- . Ascending ( x => x . Status ) ,
98
+ . Ascending ( x => x . Status )
99
+ . Ascending ( x => x . Id ) ,
99
100
new CreateIndexOptions { Background = true , Name = "idx_nextExec_v2" } ) ) ;
100
101
101
102
instance . Events . Indexes . CreateOne ( new CreateIndexModel < Event > (
@@ -111,17 +112,9 @@ static void CreateIndexes(MongoPersistenceProvider instance)
111
112
112
113
instance . EventSubscriptions . Indexes . CreateOne ( new CreateIndexModel < EventSubscription > (
113
114
Builders < EventSubscription > . IndexKeys
114
- . Ascending ( x => x . EventKey )
115
- . Ascending ( x => x . EventName ) ,
116
- new CreateIndexOptions { Background = true , Name = "idx_namekey_v2" } ) ) ;
117
-
118
- instance . EventSubscriptions . Indexes . CreateOne ( new CreateIndexModel < EventSubscription > (
119
- Builders < EventSubscription > . IndexKeys . Ascending ( x => x . SubscribeAsOf ) ,
120
- new CreateIndexOptions { Background = true , Name = "idx_subscribe" } ) ) ;
121
-
122
- instance . EventSubscriptions . Indexes . CreateOne ( new CreateIndexModel < EventSubscription > (
123
- Builders < EventSubscription > . IndexKeys . Ascending ( x => x . ExternalToken ) ,
124
- new CreateIndexOptions { Background = true , Name = "idx_token" } ) ) ;
115
+ . Ascending ( x => x . EventName )
116
+ . Ascending ( x => x . EventKey ) ,
117
+ new CreateIndexOptions { Background = true , Name = "idx_namekey" } ) ) ;
125
118
126
119
instance . ScheduledCommands . Indexes . CreateOne ( new CreateIndexModel < ScheduledCommand > (
127
120
Builders < ScheduledCommand > . IndexKeys
0 commit comments