Rename things, add comments

This commit is contained in:
binwiederhier 2023-06-10 20:42:02 -04:00
parent 1abcc88fce
commit 9d5556c7f5
4 changed files with 30 additions and 24 deletions

View file

@ -9,7 +9,7 @@ import pruner from "../app/Pruner";
import session from "../app/Session";
import accountApi from "../app/AccountApi";
import { UnauthorizedError } from "../app/errors";
import { webPushRefreshWorker, useWebPushUpdateWorker } from "../app/WebPushWorker";
import { webPush, useWebPushTopicListener } from "../app/WebPush";
/**
* Wire connectionManager and subscriptionManager so that subscriptions are updated when the connection
@ -134,18 +134,18 @@ const stopWorkers = () => {
poller.stopWorker();
pruner.stopWorker();
accountApi.stopWorker();
webPushRefreshWorker.stopWorker();
webPush.stopWorker();
};
const startWorkers = () => {
poller.startWorker();
pruner.startWorker();
accountApi.startWorker();
webPushRefreshWorker.startWorker();
webPush.startWorker();
};
export const useBackgroundProcesses = () => {
useWebPushUpdateWorker();
useWebPushTopicListener();
useEffect(() => {
console.log("[useBackgroundProcesses] mounting");