MCPcopy
hub / github.com/iterative/cml / unregisterRunner

Function unregisterRunner

bin/cml/runner/launch.js:28–46  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

26 const { name, tfResource, noRetry, reason, destroyDelay, watcher } = opts;
27
28 const unregisterRunner = async () => {
29 if (!RUNNER) return true;
30
31 try {
32 logger.info(`Unregistering runner ${name}...`);
33 await cml.unregisterRunner({ name });
34 } catch (err) {
35 if (err.message.includes('is still running a job')) {
36 logger.warn(`\tCancelling shutdown: ${err.message}`);
37 return false;
38 }
39
40 logger.error(`\tFailed: ${err.message}`);
41 }
42
43 RUNNER.kill('SIGINT');
44 logger.info('\tSuccess');
45 return true;
46 };
47
48 const retryWorkflows = async () => {
49 try {

Callers 1

shutdownFunction · 0.85

Calls 2

unregisterRunnerMethod · 0.45
warnMethod · 0.45

Tested by

no test coverage detected