diff --git a/index.js b/index.js index e5f0a08..84475e2 100644 --- a/index.js +++ b/index.js @@ -91,14 +91,6 @@ const reportIP = async (event, country, hostname, endpoint, userAgent, cycleErro }; (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...'); await clientIp.fetchIPAddress(); @@ -107,6 +99,15 @@ const reportIP = async (event, country, hostname, endpoint, userAgent, cycleErro 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 let cycleId = 1; while (true) {