Create a way to empty a queue

Created on 22 September 2023, 9 months ago
Updated 23 May 2024, about 1 month ago

Problem/Motivation

As someone who maintains queues it would be nice to have the ability with both Drush and UI to be able to empty a queue. The UI currently supports deleting a queue, but that creates errors the next time you try to add something to the queue. So the current solution if you needed to clear a queue is to delete it and then do a config import to restore the queue's existence.
As drush commands go we have

  • advancedqueue:queue:list
  • advancedqueue:queue:process

It would be nice to have parity with core queue that provides

  • queue:run Run a specific queue by name.
  • queue:list Returns a list of all defined queues.
  • queue:delete Delete all items in a specific queue.

Though admittedly, "delete" is poorly named in core because it is really an empty or purge.
Given that this is a risky operation depending on what the queue is used for, it might be a good idea to have some kind of confirmation screen like "You are about to .... are you sure you want to proceed?"

Proposed resolution

  1. Add a drush command `advancedqueue:queue:empty [queue_name]`
  2. Add an operation in the UI for 'empty'

Performing either operation should have some logging of who did it, what was emptied, and how many items were emptied.

Remaining tasks

User interface changes

API changes

Data model changes

โœจ Feature request
Status

Active

Version

1.0

Component

Code

Created by

๐Ÿ‡บ๐Ÿ‡ธUnited States swirt Florida

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024