Skip to content

Commit

Permalink
add g mode log
Browse files Browse the repository at this point in the history
  • Loading branch information
TheTrunk committed Jul 29, 2024
1 parent 02abcb4 commit 70caee4
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/services/domainService.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ async function selectIPforG(ips, app) {
async function generateAndReplaceMainApplicationHaproxyConfig(isGmode = false, timeout = 30) {
try {
if (isGmode) {
log.info('G Mode STARTED at' + new Date());
if (!recentlyConfiguredApps) {
throw new Error('G Mode is awaiting processing');
}
Expand Down Expand Up @@ -608,11 +609,12 @@ async function generateAndReplaceMainApplicationHaproxyConfig(isGmode = false, t
if (!successRestart) {
throw new Error('Invalid HAPROXY Config File!');
}
setTimeout(() => {
generateAndReplaceMainApplicationHaproxyConfig(isGmode, timeout);
}, timeout * 1000);
} catch (error) {
log.error(error);
} finally {
if (isGmode) {
log.info('G Mode ENDED at' + new Date());
}
setTimeout(() => {
generateAndReplaceMainApplicationHaproxyConfig(isGmode, timeout);
}, timeout * 1000);
Expand Down

0 comments on commit 70caee4

Please sign in to comment.