MCPcopy Create free account
hub / github.com/pywebio/PyWebIO / get_tasks

Method get_tasks

webiojs/src/utils.ts:226–239  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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();

Callers 1

do_sendMethod · 0.95

Calls 1

pushMethod · 0.80

Tested by

no test coverage detected