Queue Delete
queue_deleteRemove items from a Drupal queue by item ID, by deleting the oldest count, or by clearing the entire queue without requiring Drush service registration.
Instructions
Delete queue items: one by id, the oldest count, or the whole queue.
Drush's queue:delete takes exactly one argument - the queue name - so
the item_id and count forms cannot go through it: they passed extra
arguments that Drush refused with "Too many arguments", and all three
branches failed, so this tool never once succeeded.
Even the plain case now runs in PHP rather than through Drush, because
queue:delete only resolves queues that are registered as services and
answers "Queue not found" for anything else - including a queue this
very server just created with queue_create. Queue::deleteQueue() is
what Drush calls internally, so the result is the same operation without
Drush's registration requirement.
item_id deliberately repeats the queue name in its condition even
though core's own DatabaseQueue::deleteItem() does not - that method
deletes by item_id alone, so without the name a request for an item in
one queue would happily delete a different queue's item that happened to
share the id.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| count | No | ||
| item_id | No | ||
| queue_name | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||