MCPcopy Index your code
hub / github.com/Acode-Foundation/Acode / isRunning

Method isRunning

src/plugins/terminal/www/Executor.js:159–171  ·  view source on GitHub ↗

* Checks if a process is still running. * * @param {string} uuid - The process ID returned by Executor#start. * @returns {Promise } Resolves `true` if the process is running, `false` otherwise. * * @example * const isAlive = await executor.isRunning(uuid);

(uuid)

Source from the content-addressed store, hash-verified

157 * const isAlive = await executor.isRunning(uuid);
158 */
159 isRunning(uuid) {
160 return new Promise((resolve, reject) => {
161 exec(
162 (result) => {
163 resolve(result === "running");
164 },
165 reject,
166 this.ExecutorType,
167 "isRunning",
168 [uuid]
169 );
170 });
171 }
172
173 /**
174 * Lists the processes currently managed by this executor.

Callers 1

runExecutorTestsFunction · 0.80

Calls 2

resolveFunction · 0.85
execFunction · 0.50

Tested by

no test coverage detected