MCPcopy Create free account
hub / github.com/Kong/insomnia / enqueue

Method enqueue

packages/insomnia/src/sync/git/sync-queue.ts:26–38  ·  view source on GitHub ↗

* Add a task to the end of the queue. Processing starts automatically.

(task: Task)

Source from the content-addressed store, hash-verified

24 * Add a task to the end of the queue. Processing starts automatically.
25 */
26 enqueue(task: Task): void {
27 if (this.stopped) {
28 return;
29 }
30 this.tail = this.tail.then(() => {
31 if (this.stopped) {
32 return;
33 }
34 return task().catch(err => {
35 console.warn('[sync-queue] Task error:', err);
36 });
37 });
38 }
39
40 /**
41 * Returns a promise that resolves once all currently-enqueued tasks (including

Callers 6

flushNowMethod · 0.80
importAllFilesMethod · 0.80
pollDirectoryMethod · 0.80
scheduleImportMethod · 0.80
sync-queue.test.tsFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected