diff --git a/api/src/processing/cookie/manager.js b/api/src/processing/cookie/manager.js index 82f73a5f..946ab70a 100644 --- a/api/src/processing/cookie/manager.js +++ b/api/src/processing/cookie/manager.js @@ -62,13 +62,19 @@ const setupWorker = async () => { cookies = (await cluster.waitFor('cookies')).cookies; } -export const setup = async (cookiePath) => { +export const loadFromFile = async (path) => { if (cluster.isPrimary) { - await setupMain(cookiePath); + await setupMain(path); } else if (cluster.isWorker) { await setupWorker(); } + dirty = false; +} + +export const setup = async (path) => { + await loadFromFile(path); + if (isCluster) { const messageHandler = (message) => { if ('cookieUpdate' in message) {