Add getProcessName
This commit is contained in:
parent
7f6eabaa90
commit
6e57225529
@ -1188,6 +1188,17 @@ export default class Services {
|
||||
}
|
||||
}
|
||||
|
||||
public getProcessName(process: Process): string | null {
|
||||
const lastCommitedState = this.getLastCommitedState(process);
|
||||
if (lastCommitedState && lastCommitedState.descriptions) {
|
||||
const processName = lastCommitedState!.descriptions['processName'];
|
||||
if (processName) { return processName }
|
||||
else { return null }
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public async getMyProcesses(): Promise<string[]> {
|
||||
try {
|
||||
const processes = await this.getProcesses();
|
||||
|
Loading…
x
Reference in New Issue
Block a user