(flag: string, version?: string)
| 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> { |
no test coverage detected