forked from engineering/cloudservices
change spawn path
parent
c707a05f35
commit
f4ab9e9cb8
|
@ -25,11 +25,11 @@ export default async function storage(client: Client) {
|
||||||
setInterval(async () => {
|
setInterval(async () => {
|
||||||
await main();
|
await main();
|
||||||
}, 900000); */
|
}, 900000); */
|
||||||
let storageGo = spawn(`${__dirname}/../bin/storage`, []);
|
let storageGo = spawn(`${__dirname}/../bin/storage`, [], { cwd: __dirname });
|
||||||
storageGo.stdout.on('data', (data) => client.signale.log(data.toString()));
|
storageGo.stdout.on('data', (data) => client.signale.log(data.toString()));
|
||||||
storageGo.stderr.on('data', (data) => client.signale.log(data.toString()));
|
storageGo.stderr.on('data', (data) => client.signale.log(data.toString()));
|
||||||
storageGo.on('exit', (code) => {
|
storageGo.on('exit', (code) => {
|
||||||
client.signale.log(`Go storage func exited with code ${code}, restarting`);
|
client.signale.log(`Go storage func exited with code ${code}, restarting`);
|
||||||
storageGo = spawn(`${__dirname}/../bin/storage`, []);
|
storageGo = spawn(`${__dirname}/../bin/storage`, [], { cwd: __dirname });
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue