@@ -301,15 +301,10 @@ export class Api {
301
301
await this . redis . multi ( )
302
302
. xDelIfEmpty ( task . stream )
303
303
. xDel ( this . redisWorkerStreamName , task . id )
304
+ . xAck ( this . redisWorkerStreamName , this . redisWorkerGroupName , task . id )
304
305
. sRem ( this . workerSetName , task . stream )
305
306
. exec ( )
306
307
logWorker ( 'Stream still empty, removing recurring task from queue ' , { stream : task . stream } )
307
-
308
- await this . redis . xAck (
309
- this . redisWorkerStreamName ,
310
- this . redisWorkerGroupName ,
311
- task . id
312
- )
313
308
} else {
314
309
reclaimCounts ++
315
310
const { room, docid } = decodeRedisRoomStreamName ( task . stream , this . prefix )
@@ -325,16 +320,10 @@ export class Api {
325
320
. xTrim ( task . stream , 'MINID' , lastId - this . redisMinMessageLifetime )
326
321
. xAdd ( this . redisWorkerStreamName , '*' , { compact : task . stream } )
327
322
. xDel ( this . redisWorkerStreamName , task . id )
323
+ . xAck ( this . redisWorkerStreamName , this . redisWorkerGroupName , task . id )
328
324
. sAdd ( this . workerSetName , task . stream )
329
325
. exec ( )
330
326
] )
331
-
332
- await this . redis . xAck (
333
- this . redisWorkerStreamName ,
334
- this . redisWorkerGroupName ,
335
- task . id
336
- )
337
-
338
327
logWorker ( 'Compacted stream ' , { stream : task . stream , taskId : task . id , newLastId : lastId - this . redisMinMessageLifetime } )
339
328
try {
340
329
if ( ydocUpdateCallback != null ) {
0 commit comments