diff --git a/Common/Server/Infrastructure/Queue.ts b/Common/Server/Infrastructure/Queue.ts index aa4893befe..30dc87946b 100644 --- a/Common/Server/Infrastructure/Queue.ts +++ b/Common/Server/Infrastructure/Queue.ts @@ -14,8 +14,7 @@ import { ExpressRouter } from "../Utils/Express"; export enum QueueName { Workflow = "Workflow", - Worker = "Worker", - WorkerNotification = "WorkerNotification", + Worker = "Worker" } export type QueueJob = Job; diff --git a/Common/Types/Events/Recurring.ts b/Common/Types/Events/Recurring.ts index cd6b46eacc..f6986245c1 100644 --- a/Common/Types/Events/Recurring.ts +++ b/Common/Types/Events/Recurring.ts @@ -81,7 +81,7 @@ export default class Recurring extends DatabaseProperty { if (nextDate.getTime() <= dateNow.getTime()) { while (nextDate.getTime() <= dateNow.getTime()) { - nextDate = this.getNextDateInterval(startDate, rotation); + nextDate = this.getNextDateInterval(nextDate, rotation); } } diff --git a/Worker/Jobs/StatusPage/SendReportsToSubscribers.ts b/Worker/Jobs/StatusPage/SendReportsToSubscribers.ts index 7785162024..37fc76934b 100644 --- a/Worker/Jobs/StatusPage/SendReportsToSubscribers.ts +++ b/Worker/Jobs/StatusPage/SendReportsToSubscribers.ts @@ -7,14 +7,12 @@ import StatusPageService from "Common/Server/Services/StatusPageService"; import QueryHelper from "Common/Server/Types/Database/QueryHelper"; import logger from "Common/Server/Utils/Logger"; import StatusPage from "Common/Models/DatabaseModels/StatusPage"; -import { QueueName } from "Common/Server/Infrastructure/Queue"; RunCron( "StatusPage:SendReportToSubscribers", { schedule: EVERY_MINUTE, - runOnStartup: false, - queueName: QueueName.WorkerNotification, + runOnStartup: false }, async () => { // get all scheduled events of all the projects. diff --git a/Worker/Routes.ts b/Worker/Routes.ts index c2b5991f71..9fabeaca6b 100644 --- a/Worker/Routes.ts +++ b/Worker/Routes.ts @@ -133,25 +133,6 @@ const WorkersFeatureSet: FeatureSet = { { concurrency: 100 }, ); - // Job process. - QueueWorker.getWorker( - QueueName.WorkerNotification, - async (job: QueueJob) => { - const name: string = job.name; - - logger.debug("Running Job: " + name); - - const funcToRun: PromiseVoidFunction = - JobDictionary.getJobFunction(name); - - const timeoutInMs: number = JobDictionary.getTimeoutInMs(name); - - if (funcToRun) { - await QueueWorker.runJobWithTimeout(timeoutInMs, funcToRun); - } - }, - { concurrency: 100 }, - ); } catch (err) { logger.error("App Init Failed:"); logger.error(err);