mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-06-19 06:05:25 +02:00
refactor(queues): migrate from BullMQ to p-limit for deployment management
This commit introduces a new queue system using p-limit, addressing resource issues and improving job cancellation capabilities. Key changes include: - Removal of Redis dependency, allowing for in-memory queue management. - Implementation of per-server queues with ordered processing based on server concurrency settings. - Addition of helper functions for job management and status retrieval, ensuring backward compatibility with existing API endpoints. - Updates to database schema to support server concurrency settings. The legacy BullMQ code has been retained for compatibility but is no longer in active use.
This commit is contained in:
@@ -48,6 +48,7 @@ export const server = pgTable("server", {
|
||||
sshKeyId: text("sshKeyId").references(() => sshKeys.sshKeyId, {
|
||||
onDelete: "set null",
|
||||
}),
|
||||
concurrency: integer("concurrency").notNull().default(1),
|
||||
metricsConfig: jsonb("metricsConfig")
|
||||
.$type<{
|
||||
server: {
|
||||
|
||||
@@ -62,6 +62,7 @@ export const users_temp = pgTable("user_temp", {
|
||||
// Metrics
|
||||
enablePaidFeatures: boolean("enablePaidFeatures").notNull().default(false),
|
||||
allowImpersonation: boolean("allowImpersonation").notNull().default(false),
|
||||
serverConcurrency: integer("serverConcurrency").notNull().default(1),
|
||||
metricsConfig: jsonb("metricsConfig")
|
||||
.$type<{
|
||||
server: {
|
||||
|
||||
Reference in New Issue
Block a user