Files
dokploy/apps/schedules/src/workers.ts
Mauricio Siu e3ec8f1589 Add backup and deployment schema updates for improved data handling
- Introduced new SQL file `0089_noisy_sandman.sql` to create a new enum type `backupType` and add relevant columns to the `backup` and `deployment` tables, enhancing data structure for backup management.
- Removed outdated SQL files `0090_lame_gressill.sql` and `0091_colossal_lifeguard.sql` that contained redundant column definitions, streamlining the database schema.
- Updated journal and snapshot JSON files to reflect the latest schema changes, ensuring consistency across the database structure.
2025-05-04 15:13:49 -06:00

29 lines
631 B
TypeScript

import { type Job, Worker } from "bullmq";
import { logger } from "./logger.js";
import { connection } from "./queue.js";
import type { QueueJob } from "./schema.js";
import { runJobs } from "./utils.js";
export const firstWorker = new Worker(
"backupQueue",
async (job: Job<QueueJob>) => {
logger.info({ data: job.data }, "Running job");
await runJobs(job.data);
},
{
concurrency: 50,
connection,
},
);
export const secondWorker = new Worker(
"backupQueue",
async (job: Job<QueueJob>) => {
logger.info({ data: job.data }, "Running job");
await runJobs(job.data);
},
{
concurrency: 50,
connection,
},
);