forked from engineering/cloudservices
daemonization changes for storage calculations
parent
8378b27c96
commit
00dde49d79
|
@ -18,6 +18,7 @@ export default async function storage(client: Client) {
|
|||
client.signale.log(`Go storage func exited with code ${code}, restarting`);
|
||||
storageGo = spawn(`${__dirname}/../bin/storage`, [], { cwd: __dirname });
|
||||
}); */
|
||||
client.signale.info(`Activated CSD-GO-STR daemon startup interval. Starting in ${intervalTiming / 60000}min.`);
|
||||
interval = setInterval(async () => {
|
||||
intervalTiming = await determineInterval(client);
|
||||
const storageDaemon = spawn(`${__dirname}/../bin/storage`, [], { cwd: __dirname });
|
||||
|
@ -26,6 +27,7 @@ export default async function storage(client: Client) {
|
|||
storageDaemon.on('exit', (code) => {
|
||||
client.signale.log(`CSD-GO-STR Daemon exited with code ${code}.`);
|
||||
storageDaemon.removeAllListeners();
|
||||
client.signale.info(`Reactivating CSD-GO-STR daemon startup interval. Reactivating in ${intervalTiming / 60000}min.`);
|
||||
});
|
||||
}, intervalTiming);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue