Skip to content

Commit

Permalink
update every 3 s + timeline = 10s
Browse files Browse the repository at this point in the history
  • Loading branch information
dispherical committed Jul 17, 2024
1 parent d4bfa62 commit 6f5d5a8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 });
Expand Down
2 changes: 1 addition & 1 deletion utils/allTimeline.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "";
Expand Down

0 comments on commit 6f5d5a8

Please sign in to comment.