@@ -77,7 +77,6 @@ export class SharedQueueConsumer {
77
77
private _currentSpan : Span | undefined ;
78
78
private _endSpanInNextIteration = false ;
79
79
private _tasks = sharedQueueTasks ;
80
- private _inProgressAttempts : Map < string , string > = new Map ( ) ; // Keys are task attempt friendly IDs, values are TaskRun ids/queue message ids
81
80
82
81
constructor (
83
82
private _sender : ZodMessageSender < typeof serverWebsocketMessages > ,
@@ -151,38 +150,6 @@ export class SharedQueueConsumer {
151
150
}
152
151
}
153
152
154
- async #cancelInProgressAttempts( reason : string ) {
155
- const service = new CancelAttemptService ( ) ;
156
-
157
- const cancelledAt = new Date ( ) ;
158
-
159
- const inProgressAttempts = new Map ( this . _inProgressAttempts ) ;
160
-
161
- this . _inProgressAttempts . clear ( ) ;
162
-
163
- for ( const [ attemptId , messageId ] of inProgressAttempts ) {
164
- await this . #cancelInProgressAttempt( attemptId , messageId , service , cancelledAt , reason ) ;
165
- }
166
- }
167
-
168
- async #cancelInProgressAttempt(
169
- attemptId : string ,
170
- messageId : string ,
171
- cancelAttemptService : CancelAttemptService ,
172
- cancelledAt : Date ,
173
- reason : string
174
- ) {
175
- try {
176
- await cancelAttemptService . call ( attemptId , messageId , cancelledAt , reason ) ;
177
- } catch ( e ) {
178
- logger . error ( "Failed to cancel in progress attempt" , {
179
- attemptId,
180
- messageId,
181
- error : e ,
182
- } ) ;
183
- }
184
- }
185
-
186
153
#enable( ) {
187
154
if ( this . _enabled ) {
188
155
return ;
@@ -495,8 +462,6 @@ export class SharedQueueConsumer {
495
462
} ,
496
463
} ) ;
497
464
}
498
-
499
- this . _inProgressAttempts . set ( taskRunAttempt . friendlyId , message . messageId ) ;
500
465
} catch ( e ) {
501
466
if ( e instanceof Error ) {
502
467
this . _currentSpan ?. recordException ( e ) ;
0 commit comments