Updates
This commit is contained in:
parent
efc87a2389
commit
ef54906d9a
@ -23,10 +23,16 @@ export default async function cronCheckServices() {
|
||||
const test = await healthcheck({ server, service });
|
||||
|
||||
if (!test) {
|
||||
console.log(
|
||||
`Server ${server.private_ip} down. Restarting ...`,
|
||||
);
|
||||
|
||||
const MAX_RETRIES = 5;
|
||||
let retries = 0;
|
||||
|
||||
while (retries < MAX_RETRIES) {
|
||||
console.log(`Retryig #${retries + 1} ...`);
|
||||
|
||||
await serviceFlight({
|
||||
deployment: config,
|
||||
servers: [server],
|
||||
|
||||
@ -78,8 +78,7 @@ export default async function relayExecSSH({
|
||||
writeFileSync(relayShExecFile, relaySh);
|
||||
|
||||
let relayCmd = ``;
|
||||
|
||||
relayCmd += ` 'chmod +x ${relayShExecFile} && /bin/bash ${relayShExecFile}'\n`;
|
||||
relayCmd += `chmod +x ${relayShExecFile} && /bin/bash ${relayShExecFile}\n`;
|
||||
|
||||
if (detached) {
|
||||
exec(relayCmd);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user