mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
- 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.
29 lines
631 B
TypeScript
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,
|
|
},
|
|
);
|