|
|
@@ -23,7 +23,7 @@ export class TaskService {
|
|
|
private senderCursor = 0
|
|
|
private senderCache: Sender[] = []
|
|
|
private readonly pollIntervalMs = 5000
|
|
|
- private readonly taskBatchSize = 20
|
|
|
+ private readonly taskBatchSize = 50
|
|
|
private readonly instanceId = `${process.pid}-${Math.random().toString(36).slice(2, 8)}`
|
|
|
|
|
|
constructor(app: FastifyInstance) {
|
|
|
@@ -252,7 +252,6 @@ export class TaskService {
|
|
|
await this.taskRepository.increment({ id: task.id }, 'successCount', batchSuccess)
|
|
|
}
|
|
|
|
|
|
- // 如果未跑完整个批次,说明中途被暂停/停止,直接返回
|
|
|
if (batchSent < pendingItems.length) {
|
|
|
return
|
|
|
}
|