()
| 224 | } |
| 225 | |
| 226 | private get_tasks() { |
| 227 | let tasks: any[] = []; |
| 228 | for (let item of this.queue) { |
| 229 | if (!item.enable_batch) |
| 230 | break; |
| 231 | tasks.push(item.task); |
| 232 | } |
| 233 | let batch_send = true; |
| 234 | if (tasks.length === 0 && this.queue.length > 0 && !this.queue[0].enable_batch) { |
| 235 | batch_send = false; |
| 236 | tasks.push(this.queue[0].task); |
| 237 | } |
| 238 | return {tasks, batch_send}; |
| 239 | } |
| 240 | |
| 241 | private do_send() { |
| 242 | const info = this.get_tasks(); |