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

Method stop

src/emulator/functionsEmulator.ts:544–574  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

542 }
543
544 async stop(): Promise<void> {
545 try {
546 await this.workQueue.flush();
547 } catch (e: any) {
548 this.logger.logLabeled(
549 "WARN",
550 "functions",
551 "Functions emulator work queue did not empty before stopping",
552 );
553 }
554
555 this.workQueue.stop();
556 for (const pool of Object.values(this.workerPools)) {
557 pool.exit();
558 }
559
560 for (const watcher of this.watchers) {
561 await watcher.close();
562 }
563 this.watchers = [];
564
565 // Stop delegate watch processes (e.g., build_runner for Dart)
566 for (const cleanup of this.watchCleanups) {
567 await cleanup();
568 }
569 this.watchCleanups = [];
570
571 if (this.destroyServer) {
572 await this.destroyServer();
573 }
574 }
575
576 async discoverTriggers(
577 emulatableBackend: EmulatableBackend,

Callers

nothing calls this directly

Calls 5

logLabeledMethod · 0.80
closeMethod · 0.80
stopMethod · 0.65
flushMethod · 0.45
exitMethod · 0.45

Tested by

no test coverage detected