This commit is contained in:
Sefinek 2024-09-14 13:27:56 +02:00
parent 35b163c871
commit 66782f05a7

View file

@ -91,14 +91,6 @@ const reportIP = async (event, country, hostname, endpoint, userAgent, cycleErro
}; };
(async () => { (async () => {
if (process.env.NODE_ENV === 'production') {
try {
process.send('ready');
} catch (err) {
log('log', `Failed to send ready signal to parent process. ${err.message}`);
}
}
log('log', 'Loading data, please wait...'); log('log', 'Loading data, please wait...');
await clientIp.fetchIPAddress(); await clientIp.fetchIPAddress();
@ -107,6 +99,15 @@ const reportIP = async (event, country, hostname, endpoint, userAgent, cycleErro
setInterval(async () => await SefinekAPI(), SEFINEK_API_INTERVAL); setInterval(async () => await SefinekAPI(), SEFINEK_API_INTERVAL);
} }
// Ready
if (process.env.NODE_ENV === 'production') {
try {
process.send('ready');
} catch (err) {
log('log', `Failed to send ready signal to parent process. ${err.message}`);
}
}
// AbuseIPDB // AbuseIPDB
let cycleId = 1; let cycleId = 1;
while (true) { while (true) {