MCPcopy
hub / github.com/xpf0000/FlyEnv / stopService

Method stopService

src/main/core/MCPTools.ts:567–577  ·  view source on GitHub ↗
(flag: string, version?: string)

Source from the content-addressed store, hash-verified

565 }
566
567 async stopService(flag: string, version?: string): Promise<any> {
568 this.assertLifecycleFlag(flag, 'stop')
569 const v = await this.pickVersion(flag, version)
570 const data = await callFork(this.forkManager, flag, 'stopService', v)
571 // 停服登记清理:按 bin 精确删除——只删被停的那个版本,绝不波及同模块其它版本。
572 // (fork 的 stopService 已按版本精确停进程;这里只同步主进程状态登记)
573 if (v?.bin) {
574 ServiceProcessManager.delByBin(flag, [v.bin])
575 }
576 return data
577 }
578
579 /** 停掉某模块当前登记的所有运行实例 */
580 async stopAllService(flag: string): Promise<any> {

Callers 2

restartServiceMethod · 0.95
buildToolDefsMethod · 0.45

Calls 4

assertLifecycleFlagMethod · 0.95
pickVersionMethod · 0.95
delByBinMethod · 0.80
callForkFunction · 0.70

Tested by

no test coverage detected