MCPcopy Create free account
hub / github.com/firebase/firebase-tools / runNext

Method runNext

src/emulator/workQueue.ts:143–162  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

141 }
142
143 private async runNext() {
144 const next = this.queue.shift();
145 if (next) {
146 this.running.push(next.type || "anonymous");
147 this.logState();
148
149 try {
150 await next();
151 } catch (e: any) {
152 this.logger.log("DEBUG", e);
153 } finally {
154 const index = this.running.indexOf(next.type || "anonymous");
155 if (index !== -1) {
156 this.running.splice(index, 1);
157 }
158 this.notifyWorkFinish();
159 this.logState();
160 }
161 }
162 }
163
164 private logState() {
165 this.logger.logLabeled("DEBUG", "work-queue", JSON.stringify(this.getState()));

Callers 1

startMethod · 0.95

Calls 3

logStateMethod · 0.95
nextFunction · 0.50
logMethod · 0.45

Tested by

no test coverage detected