Welp, that didnt go as planned

This commit is contained in:
Christopher Cookman 2022-12-03 18:28:48 -07:00
parent 9633085862
commit d77c8f9297
Signed by: ChrisChrome
GPG key ID: A023A26E42C33A42

View file

@ -89,6 +89,7 @@ function splitKeyword(keyword) {
}
};
// Do not use this function, it's broken for some reason
function countdown(seconds, start, end) {
return new Promise((resolve, reject) => {
var i = seconds;
@ -241,11 +242,6 @@ function updateMasterList() {
}).catch((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
@ -290,6 +286,9 @@ function purgeDeadServers() {
}
// Update master list every 1 minute
setInterval(() => {
updateMasterList();
}, 60000);
updateMasterList();
app.get('/check', (req, res) => {