Create a way to empty a queue

Created on 22 September 2023, about 1 year 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.

Proposed resolution

  1. Add a drush command `advancedqueue:queue:empty `
  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

Merge Requests

Comments & Activities

Production build 0.71.5 2024