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