Skip to content

Commit 9aa5af2

Browse files
committed
Move updateLastNoticationDate call outside Promise.all
Refactored the updateLastNoticationDate invocation to occur after Promise.all resolves, ensuring it is called once per method execution rather than for each iteration.
1 parent 29928fa commit 9aa5af2

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

workers/sender/src/index.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -352,11 +352,9 @@ export default abstract class SenderWorker extends Worker {
352352
},
353353
});
354354
}
355-
356-
await this.updateLastNoticationDate(workspace, eventType);
357355
}));
358356

359-
357+
await this.updateLastNoticationDate(workspace, eventType);
360358
}
361359

362360
/**
@@ -419,9 +417,9 @@ export default abstract class SenderWorker extends Worker {
419417
},
420418
});
421419
}
422-
423-
await this.updateLastNoticationDate(workspace, eventType);
424420
}));
421+
422+
await this.updateLastNoticationDate(workspace, eventType);
425423
}
426424

427425
/**
@@ -482,9 +480,9 @@ export default abstract class SenderWorker extends Worker {
482480
},
483481
});
484482
}
485-
486-
await this.updateLastNoticationDate(workspace, eventType);
487483
}));
484+
485+
await this.updateLastNoticationDate(workspace, eventType);
488486
}
489487

490488
/**

0 commit comments

Comments
 (0)