Move things around a bit

This commit is contained in:
Philipp Heckel 2022-03-08 11:33:17 -05:00
parent 30b13cbdbc
commit 4aad98256a
5 changed files with 26 additions and 28 deletions

View file

@ -1,7 +1,7 @@
import api from "./Api";
import subscriptionManager from "./SubscriptionManager";
const delayMillis = 3000; // 3 seconds
const delayMillis = 8000; // 8 seconds
const intervalMillis = 300000; // 5 minutes
class Poller {
@ -13,6 +13,7 @@ class Poller {
if (this.timer !== null) {
return;
}
console.log(`[Poller] Starting worker`);
this.timer = setInterval(() => this.pollAll(), intervalMillis);
setTimeout(() => this.pollAll(), delayMillis);
}
@ -55,4 +56,6 @@ class Poller {
}
const poller = new Poller();
poller.startWorker();
export default poller;

View file

@ -13,6 +13,7 @@ class Pruner {
if (this.timer !== null) {
return;
}
console.log(`[Pruner] Starting worker`);
this.timer = setInterval(() => this.prune(), intervalMillis);
setTimeout(() => this.prune(), delayMillis);
}
@ -34,4 +35,6 @@ class Pruner {
}
const pruner = new Pruner();
pruner.startWorker();
export default pruner;