Welp, that didnt go as planned
This commit is contained in:
parent
9633085862
commit
d77c8f9297
9
index.js
9
index.js
|
@ -89,6 +89,7 @@ function splitKeyword(keyword) {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Do not use this function, it's broken for some reason
|
||||||
function countdown(seconds, start, end) {
|
function countdown(seconds, start, end) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
var i = seconds;
|
var i = seconds;
|
||||||
|
@ -241,11 +242,6 @@ function updateMasterList() {
|
||||||
}).catch((err) => {
|
}).catch((err) => {
|
||||||
console.log(`${colors.red(`[ERROR ${new Date()}]`)} Error updating master list: ${err}`);
|
console.log(`${colors.red(`[ERROR ${new Date()}]`)} Error updating master list: ${err}`);
|
||||||
});
|
});
|
||||||
|
|
||||||
// Start the next countdown
|
|
||||||
countdown(60, `${colors.cyan(`[INFO ${new Date()}]`)} Updating master list in `, " seconds").then(() => {
|
|
||||||
updateMasterList();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// updateServerList function
|
// updateServerList function
|
||||||
|
@ -290,6 +286,9 @@ function purgeDeadServers() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update master list every 1 minute
|
// Update master list every 1 minute
|
||||||
|
setInterval(() => {
|
||||||
|
updateMasterList();
|
||||||
|
}, 60000);
|
||||||
updateMasterList();
|
updateMasterList();
|
||||||
|
|
||||||
app.get('/check', (req, res) => {
|
app.get('/check', (req, res) => {
|
||||||
|
|
Loading…
Reference in a new issue