Refactor (4)
This commit is contained in:
4
index.ts
4
index.ts
@@ -247,8 +247,8 @@ async function pushJob() {
|
||||
while (true) {
|
||||
console.log("* push: post");
|
||||
jobs.push({ type: "post" });
|
||||
// random interval between 10 minutes and 2 hours
|
||||
const interval = Math.floor(Math.random() * 110 + 10) * 60 * 1000;
|
||||
// random interval between 10 and 40 minutes
|
||||
const interval = Math.floor(Math.random() * 30 + 10) * 60 * 1000;
|
||||
console.log(
|
||||
`* info: next post job in ${Math.round(interval / 60000)} minutes`,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user