(task: any, allow_batch_send = true)
| 215 | * the sending will retry when there are unfinished task in queue. |
| 216 | * */ |
| 217 | add_send_task(task: any, allow_batch_send = true) { |
| 218 | if (this._stop) return; |
| 219 | this.queue.push({ |
| 220 | enable_batch: allow_batch_send, |
| 221 | task: task |
| 222 | }); |
| 223 | this.do_send(); |
| 224 | } |
| 225 | |
| 226 | private get_tasks() { |
| 227 | let tasks: any[] = []; |
no test coverage detected