This commit is contained in:
Benjamin Toby 2026-03-04 18:45:38 +01:00
parent efc87a2389
commit ef54906d9a
2 changed files with 7 additions and 2 deletions

View File

@ -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],

View File

@ -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);