Dokploy / Dokploy/dokploy

Add Cancel and Delete actions to deployment queue items

Open
#4,193 3 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
TypeScript
Stars
37.4k
Forks
3k
Avg merge
1d 3h
Merged PRs (30d)
73

Description

What problem will this feature address?

Currently, the deployment queue page (/dashboard/deployments?tab=queue) provides very limited actions for queued jobs. The Cancel button only appears for cloud-hosted instances and only when a job is in the active state. There is no way to:

  • Cancel jobs that are in pending, waiting, or delayed states (only active jobs can be cancelled, and only on cloud).
  • Delete/remove jobs from the queue at all, even after they've completed or failed.
  • Remove stuck jobs that may be lingering in the queue.

This means users have no control over jobs that are waiting in the queue before they start processing, and completed/failed jobs stay in the view with no way to clean them up.

Image

Describe the solution you'd like

Add action buttons to each row in the deployment queue table:

  1. Cancel button — Available for jobs in pending, waiting, delayed, and active states. This should cancel the job via BullMQ's job.discard() or job.remove() to prevent it from being processed. Currently, cancellation only works for active jobs on cloud — this should be extended to all self-hosted users and all pre-processing states.

  2. Delete/Remove button — Available for jobs in completed, failed, and cancelled states. This removes the job from the queue entirely so it no longer clutters the queue view.

The Actions column should show the appropriate button(s) based on the job's current state:

  • pending / waiting / delayedCancel
  • activeCancel
  • completed / failed / cancelledDelete

Describe alternatives you've considered

  • "Clear all completed/failed" button — A bulk action to clean up finished jobs instead of per-row deletion. This would be a nice addition but doesn't replace the need for individual control.
  • Auto-cleanup of completed jobs — The queue already has removeOnComplete: true and removeOnFail: true set when adding jobs, so completed jobs should already be cleaned up. However, in practice they still appear in the queue view, suggesting the cleanup may not be working as expected or there's a delay. Adding explicit delete buttons would give users immediate control regardless.

Additional context

The current queue table is located at apps/dokploy/components/dashboard/deployments/show-queue-table.tsx. The cancel functionality already exists for cloud instances (api.application.cancelDeployment and api.compose.cancelDeployment), so extending it to self-hosted and additional states would primarily involve:

  1. Adding a new API route that calls BullMQ's Job.remove() / Job.discard() directly on the queue
  2. Updating the show-queue-table.tsx component to show cancel/delete buttons based on job state
  3. Removing the isCloud gate on the cancel button

Relevant queue files:

  • apps/dokploy/server/queues/deployments-queue.ts — Queue worker
  • apps/dokploy/server/queues/queueSetup.ts — Queue setup utilities
  • apps/dokploy/server/api/routers/deployment.ts — Queue list API

Will you send a PR to implement it?

Yes, I plan to submit a PR to implement this feature.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with apps/dokploy/components/dashboard/deployments/show-queue-table.tsx and the existing application.cancelDeployment and compose.cancelDeployment actions. Read deployment.ts, deployments-queue.ts, and queueSetup.ts to understand queue access and job states. Done means the table exposes Cancel or Delete for the specified states, works for self-hosted instances, and removes jobs from the queue view.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
backend, devops, frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
64/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.