diff --git a/index.js b/index.js index 9afd71f..30b4aef 100644 --- a/index.js +++ b/index.js @@ -58,9 +58,9 @@ Array.prototype.random = function () { await require("./utils/pull")({ app, client, prisma }); - cron.schedule("0,7,14,21,28,35,42,49,56 * * * * *", async () => { + setInterval(async function(){ await require("./utils/pull")({ app, client, prisma }); - }); + }, 3000) cron.schedule("0 0,12 * * *", async () => { await client.del(`${process.env.INSTANCE_ID || "production"}.messageCache`); await require("./utils/redo")({ app, client, prisma }); diff --git a/utils/allTimeline.js b/utils/allTimeline.js index 92bda99..450870c 100644 --- a/utils/allTimeline.js +++ b/utils/allTimeline.js @@ -38,7 +38,7 @@ async function generateMessageString(messages, currentTime, prisma) { }) .on("error", (err) => console.log("Redis Client Error", err)) .connect(); - const interval = 20; + const interval = 10; const secondsInDay = 86400; const intervalsInDay = secondsInDay / interval; let messageString = "";