()
| 239 | } |
| 240 | |
| 241 | private do_send() { |
| 242 | const info = this.get_tasks(); |
| 243 | const tasks = info.tasks, batch_send = info.batch_send; |
| 244 | if (tasks.length === 0) { |
| 245 | return; |
| 246 | } |
| 247 | this.last_send_time = Date.now(); |
| 248 | if (!batch_send) // for non-batch task, only retry after current request finished |
| 249 | this.ignore_interval_send = true; |
| 250 | this.sender(tasks, this.seq).then(() => { |
| 251 | this.ignore_interval_send = false; |
| 252 | }); |
| 253 | } |
| 254 | |
| 255 | private interval_send() { |
| 256 | if (this._stop || this.ignore_interval_send) return; |
no test coverage detected