@@ -55,7 +55,7 @@ protected override async Task ProcessItem(string itemId, CancellationToken cance
55
55
finally
56
56
{
57
57
WorkflowActivity . Enrich ( result ) ;
58
- await _persistenceStore . PersistWorkflow ( workflow , result . Subscriptions , cancellationToken ) ;
58
+ await _persistenceStore . PersistWorkflow ( workflow , result . Subscriptions ) ;
59
59
await QueueProvider . QueueWork ( itemId , QueueType . Index ) ;
60
60
_greylist . Remove ( $ "wf:{ itemId } ") ;
61
61
}
@@ -68,10 +68,10 @@ protected override async Task ProcessItem(string itemId, CancellationToken cance
68
68
{
69
69
foreach ( var sub in result . Subscriptions )
70
70
{
71
- await TryProcessSubscription ( sub , _persistenceStore , cancellationToken ) ;
71
+ await TryProcessSubscription ( sub , _persistenceStore ) ;
72
72
}
73
73
74
- await _persistenceStore . PersistErrors ( result . Errors , cancellationToken ) ;
74
+ await _persistenceStore . PersistErrors ( result . Errors ) ;
75
75
76
76
if ( ( workflow . Status == WorkflowStatus . Runnable ) && workflow . NextExecution . HasValue )
77
77
{
@@ -98,24 +98,24 @@ await _persistenceStore.ScheduleCommand(new ScheduledCommand()
98
98
99
99
}
100
100
101
- private async Task TryProcessSubscription ( EventSubscription subscription , IPersistenceProvider persistenceStore , CancellationToken cancellationToken )
101
+ private async Task TryProcessSubscription ( EventSubscription subscription , IPersistenceProvider persistenceStore )
102
102
{
103
103
if ( subscription . EventName != Event . EventTypeActivity )
104
104
{
105
- var events = await persistenceStore . GetEvents ( subscription . EventName , subscription . EventKey , subscription . SubscribeAsOf , cancellationToken ) ;
105
+ var events = await persistenceStore . GetEvents ( subscription . EventName , subscription . EventKey , subscription . SubscribeAsOf ) ;
106
106
107
107
foreach ( var evt in events )
108
108
{
109
109
var eventKey = $ "evt:{ evt } ";
110
110
bool acquiredLock = false ;
111
111
try
112
112
{
113
- acquiredLock = await _lockProvider . AcquireLock ( eventKey , cancellationToken ) ;
113
+ acquiredLock = await _lockProvider . AcquireLock ( eventKey , CancellationToken . None ) ;
114
114
int attempt = 0 ;
115
115
while ( ! acquiredLock && attempt < 10 )
116
116
{
117
- await Task . Delay ( Options . IdleTime , cancellationToken ) ;
118
- acquiredLock = await _lockProvider . AcquireLock ( eventKey , cancellationToken ) ;
117
+ await Task . Delay ( Options . IdleTime ) ;
118
+ acquiredLock = await _lockProvider . AcquireLock ( eventKey , CancellationToken . None ) ;
119
119
120
120
attempt ++ ;
121
121
}
@@ -127,7 +127,7 @@ private async Task TryProcessSubscription(EventSubscription subscription, IPersi
127
127
else
128
128
{
129
129
_greylist . Remove ( eventKey ) ;
130
- await persistenceStore . MarkEventUnprocessed ( evt , cancellationToken ) ;
130
+ await persistenceStore . MarkEventUnprocessed ( evt ) ;
131
131
await QueueProvider . QueueWork ( evt , QueueType . Event ) ;
132
132
}
133
133
}
0 commit comments