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

Method statusOf

src/main/core/ServiceProcess.ts:52–65  ·  view source on GitHub ↗

单个模块的运行态(纯读内存,不做进程探测)。bin 为实例唯一键

(type: string)

Source from the content-addressed store, hash-verified

50
51 /** 单个模块的运行态(纯读内存,不做进程探测)。bin 为实例唯一键 */
52 statusOf(type: string): ServiceStatusItem {
53 const list = (this.servicePID[type] ?? []).filter((i) => !!i.pid)
54 const instances: RunningInstance[] = list.map((i) => ({
55 bin: i.item?.bin,
56 path: i.item?.path,
57 version: i.item?.version ?? undefined,
58 pid: i.pid
59 }))
60 return {
61 flag: type,
62 running: instances.length > 0,
63 instances
64 }
65 }
66
67 /** 批量查询运行态。flags 省略则返回当前所有有记录的模块 */
68 getStatus(flags?: string[]): Record<string, ServiceStatusItem> {

Callers 13

emitChangeMethod · 0.95
getStatusMethod · 0.95
serviceStatusMethod · 0.80
reloadWebServerMethod · 0.80
startServiceMethod · 0.80
stopAllServiceMethod · 0.80
resolveVersionObjMethod · 0.80
versionBinRunningFunction · 0.80
resolveVersionObjMethod · 0.80
webServerVersionMethod · 0.80
resolveSiteUrlsMethod · 0.80
resolveSiteRuntimeMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected