mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-07-17 11:55:30 +02:00
feat(dependencies): update bullmq and related packages to version 5.67.3
- Upgraded bullmq to version 5.67.3 in both dokploy and schedules applications. - Added new functions to retrieve jobs by application and compose IDs in the queue setup. - Enhanced application and compose routers to cancel jobs based on user requests. - Updated package dependencies for ioredis and msgpackr to their latest versions.
This commit is contained in:
@@ -9,6 +9,16 @@ const myQueue = new Queue("deployments", {
|
||||
connection: redisConfig,
|
||||
});
|
||||
|
||||
export const getJobsByApplicationId = async (applicationId: string) => {
|
||||
const jobs = await myQueue.getJobs();
|
||||
return jobs.filter((job) => job?.data?.applicationId === applicationId);
|
||||
};
|
||||
|
||||
export const getJobsByComposeId = async (composeId: string) => {
|
||||
const jobs = await myQueue.getJobs();
|
||||
return jobs.filter((job) => job?.data?.composeId === composeId);
|
||||
};
|
||||
|
||||
process.on("SIGTERM", () => {
|
||||
myQueue.close();
|
||||
process.exit(0);
|
||||
|
||||
Reference in New Issue
Block a user