wrt.tv?.serviceUmount(id);
delete workerStatus[id];
delete workers[id];
+ console.debug(`${id} workers deleted`);
+ if (global['serviceType'] === 'GLOBAL')
+ wrt.finalizeService(id);
let runningServices = Object.keys(workers);
console.debug(`${id} terminated, remain services(${runningServices})`);
checkDyingWorker();
function terminateWorker(id: string, delay: number) {
if (!workers[id]) {
console.debug(`This worker is already terminated. ${id}`);
+ if (global['serviceType'] === 'GLOBAL')
+ wrt.finalizeService(id);
return;
}
console.debug(`${id} will shutdown after ${delay}ms`);