Skip to content

Commit

Permalink
test for g
Browse files Browse the repository at this point in the history
  • Loading branch information
TheTrunk committed Jan 14, 2024
1 parent a8ddd09 commit ef88a97
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/services/application/checks.js
Original file line number Diff line number Diff line change
Expand Up @@ -616,6 +616,7 @@ async function checkMinecraft(ip, port) {
type: 'minecraft',
host: ip,
port,
attemptTimeout: 5000,
});
return true;
} catch (error) {
Expand Down
10 changes: 5 additions & 5 deletions src/services/domainService.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ async function selectIPforG(ips, app) {
}

// periodically keeps HAproxy ans certificates updated every 4 minutes
async function generateAndReplaceMainApplicationHaproxyConfig(isGmode = false) {
async function generateAndReplaceMainApplicationHaproxyConfig(isGmode = false, timeout = 30) {
try {
if (isGmode) {
if (!recentlyConfiguredApps) {
Expand Down Expand Up @@ -601,12 +601,12 @@ async function generateAndReplaceMainApplicationHaproxyConfig(isGmode = false) {
}
setTimeout(() => {
generateAndReplaceMainApplicationHaproxyConfig(isGmode);
}, 30 * 1000);
}, timeout * 1000);
} catch (error) {
log.error(error);
setTimeout(() => {
generateAndReplaceMainApplicationHaproxyConfig(isGmode);
}, 30 * 1000);
}, timeout * 1000);
}
}

Expand Down Expand Up @@ -666,9 +666,9 @@ function initializeServices() {
log.info('Flux Main Node Domain Service initiated.');
} else if (config.mainDomain === config.cloudflare.domain && config.cloudflare.manageapp) {
// only runs on main FDM handles X.APP.runonflux.io
generateAndReplaceMainApplicationHaproxyConfig();
generateAndReplaceMainApplicationHaproxyConfig(24 * 60 * 60); // intentionally slow down for test
setTimeout(() => {
generateAndReplaceMainApplicationHaproxyConfig(true);
generateAndReplaceMainApplicationHaproxyConfig(true, 5);
}, 5 * 60 * 1000);
log.info('Flux Main Application Domain Service initiated.');
} else if (config.mainDomain === config.pDNS.domain && config.pDNS.manageapp) {
Expand Down

0 comments on commit ef88a97

Please sign in to comment.