diff --git a/server/cards.js b/server/cards.js index f74daaae..35eb483c 100644 --- a/server/cards.js +++ b/server/cards.js @@ -21,18 +21,19 @@ const modes = ['light', 'dark']; (async () => { const db = await dbConnection(); while (true) { + await sleep(5000); + const profiles = (await db.all(` SELECT profiles.id, profiles.locale, users.username FROM profiles LEFT JOIN users on profiles.userId = users.id WHERE profiles.card IS NULL ORDER BY RANDOM() - LIMIT 8 + LIMIT 6 `)).filter(({locale}) => !isHighLoadTime(locale)); if (profiles.length === 0) { console.log('No profiles in the queue'); - await sleep(5000); continue; } diff --git a/server/overload.js b/server/overload.js index 0b1c7076..647e6672 100644 --- a/server/overload.js +++ b/server/overload.js @@ -1,5 +1,5 @@ const overloadPeriods = { - en: [[16, 23]], + en: [[15, 24]], }; module.exports = (locale, timestamp = new Date) => {