MCPcopy Create free account
hub / github.com/parse-community/parse-server / enqueue

Method enqueue

src/KeyPromiseQueue.js:10–20  ·  view source on GitHub ↗
(key, operation)

Source from the content-addressed store, hash-verified

8 }
9
10 enqueue(key, operation) {
11 const tuple = this.beforeOp(key);
12 const toAwait = tuple[1];
13 const nextOperation = toAwait.then(operation);
14 const wrappedOperation = nextOperation.then(result => {
15 this.afterOp(key);
16 return result;
17 });
18 tuple[1] = wrappedOperation;
19 return wrappedOperation;
20 }
21
22 beforeOp(key) {
23 let tuple = this.queue[key];

Callers

nothing calls this directly

Calls 2

beforeOpMethod · 0.95
afterOpMethod · 0.95

Tested by

no test coverage detected