MCPcopy Index your code
hub / github.com/ampproject/amphtml / enqueue

Method enqueue

src/service/task-queue.js:79–84  ·  view source on GitHub ↗

* Enqueues the task. If the task is already in the queue, the error is * thrown. * @param {!TaskDef} task

(task)

Source from the content-addressed store, hash-verified

77 * @param {!TaskDef} task
78 */
79 enqueue(task) {
80 devAssert(!this.taskIdMap_[task.id], 'Task already enqueued: %s', task.id);
81 this.tasks_.push(task);
82 this.taskIdMap_[task.id] = task;
83 this.lastEnqueueTime_ = Date.now();
84 }
85
86 /**
87 * Dequeues the task and returns "true" if dequeueing is successful. Otherwise

Callers 11

test-task-queue.jsFile · 0.45
test-resources.jsFile · 0.45
startFunction · 0.45
test-response.jsFile · 0.45
enqueueTask_Method · 0.45
registerAnchorMutatorMethod · 0.45
work_Method · 0.45
reschedule_Method · 0.45
schedule_Method · 0.45

Calls 3

devAssertFunction · 0.90
nowMethod · 0.80
pushMethod · 0.45

Tested by

no test coverage detected