Add Cancel and Delete actions to deployment queue items
Nobody has claimed this yet.
- 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, ordelayedstates (onlyactivejobs 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.
Describe the solution you'd like
Add action buttons to each row in the deployment queue table:
-
Cancel button — Available for jobs in
pending,waiting,delayed, andactivestates. This should cancel the job via BullMQ'sjob.discard()orjob.remove()to prevent it from being processed. Currently, cancellation only works foractivejobs on cloud — this should be extended to all self-hosted users and all pre-processing states. -
Delete/Remove button — Available for jobs in
completed,failed, andcancelledstates. 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/delayed→ Cancelactive→ Cancelcompleted/failed/cancelled→ Delete
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: trueandremoveOnFail: trueset 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:
- Adding a new API route that calls BullMQ's
Job.remove()/Job.discard()directly on the queue - Updating the
show-queue-table.tsxcomponent to show cancel/delete buttons based on job state - Removing the
isCloudgate on the cancel button
Relevant queue files:
apps/dokploy/server/queues/deployments-queue.ts— Queue workerapps/dokploy/server/queues/queueSetup.ts— Queue setup utilitiesapps/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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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