Skip to content

Commit

Permalink
fix: increase query time for new services etc
Browse files Browse the repository at this point in the history
  • Loading branch information
andrasbacsai committed Jul 18, 2023
1 parent 3ba44a1 commit 5cb0bcf
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions apps/api/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,17 +188,17 @@ const host = '0.0.0.0';
// Refresh and check templates
setInterval(async () => {
await refreshTemplates();
}, 60000);
}, 60000 * 10);

setInterval(async () => {
await refreshTags();
}, 60000);
}, 60000 * 10);

setInterval(
async () => {
await migrateServicesToNewTemplate();
},
isDev ? 10000 : 60000
isDev ? 10000 : 60000 * 10
);

setInterval(async () => {
Expand Down Expand Up @@ -233,7 +233,7 @@ async function getIPAddress() {
console.log(`Getting public IPv6 address...`);
await prisma.setting.update({ where: { id: settings.id }, data: { ipv6 } });
}
} catch (error) {}
} catch (error) { }
}
async function getTagsTemplates() {
const { default: got } = await import('got');
Expand All @@ -245,15 +245,15 @@ async function getTagsTemplates() {
if (await fs.stat('./testTemplate.yaml')) {
templates = templates + (await fs.readFile('./testTemplate.yaml', 'utf8'));
}
} catch (error) {}
} catch (error) { }
try {
if (await fs.stat('./testTags.json')) {
const testTags = await fs.readFile('./testTags.json', 'utf8');
if (testTags.length > 0) {
tags = JSON.stringify(JSON.parse(tags).concat(JSON.parse(testTags)));
}
}
} catch (error) {}
} catch (error) { }

await fs.writeFile('./templates.json', JSON.stringify(yaml.load(templates)));
await fs.writeFile('./tags.json', tags);
Expand Down Expand Up @@ -293,7 +293,7 @@ async function initServer() {
try {
console.log(`[001] Initializing server...`);
await executeCommand({ command: `docker network create --attachable coolify` });
} catch (error) {}
} catch (error) { }
try {
console.log(`[002] Cleanup stucked builds...`);
const isOlder = compareVersions('3.8.1', version);
Expand All @@ -303,7 +303,7 @@ async function initServer() {
data: { status: 'failed' }
});
}
} catch (error) {}
} catch (error) { }
try {
console.log('[003] Cleaning up old build sources under /tmp/build-sources/...');
if (!isDev) await fs.rm('/tmp/build-sources', { recursive: true, force: true });
Expand All @@ -319,7 +319,7 @@ async function getArch() {
console.log(`Getting architecture...`);
await prisma.setting.update({ where: { id: settings.id }, data: { arch: process.arch } });
}
} catch (error) {}
} catch (error) { }
}

async function cleanupStuckedContainers() {
Expand Down Expand Up @@ -477,7 +477,7 @@ async function checkProxies() {
}
try {
await createRemoteEngineConfiguration(docker.id);
} catch (error) {}
} catch (error) { }
}
}
// TCP Proxies
Expand Down Expand Up @@ -516,7 +516,7 @@ async function checkProxies() {
// await startTraefikTCPProxy(destinationDocker, id, publicPort, 9000);
// }
// }
} catch (error) {}
} catch (error) { }
}

async function copySSLCertificates() {
Expand Down

0 comments on commit 5cb0bcf

Please sign in to comment.