Drupal is a registered trademark of Dries Buytaert
Protected Pages 3.0.0 Major update available for module protected_pages (3.0.0). Commerce Core 3.3.8 Minor update available for module commerce (3.3.8). Layout Builder Reorder 2.0.1 Minor update available for module layout_builder_reorder (2.0.1). Ban 1.1.0 Minor update available for module ban (1.1.0). Field Formatter Range 2.0.0 Major update available for module field_formatter_range (2.0.0). Field Formatter Range 8.x-1.8 Minor update available for module field_formatter_range (8.x-1.8). UI Patterns (SDC in Drupal UI) 2.0.18 Minor update available for module ui_patterns (2.0.18). Varbase FAQs 9.2.1 Minor update available for module varbase_faqs (9.2.1). Search API Solr 4.3.11 Module search_api_solr updated after 14 months of inactivity (4.3.11). Provus Mega Menu Module provus_mega_menu crossed 1,000 active installs.

This module provides hooks that allow developers to interact with and modify queue operations at various stages, such as before an item is created, when an item is claimed, or when a queue is emptied. This enables custom logic to be applied to Drupal's queue system.

This module provides hooks that are invoked at various points in the queue lifecycle.

Requirements

This module requires no modules outside of Drupal core.

Configuration

  1. Enable the module at Administration > Extend.
  2. Implement any of the hooks provided by the module in your custom modules.

Hooks

Every hook has a generic version that has the queue name passed as argument, and a queue-specific version where the queue name is part of the hook name. Please refer to queue_hooks.api.php for a full overview of available hooks.

Hook Description hook_queue_item_pre_create(object $item) Respond to an item about to be created in a queue. hook_queue_item_pre_create_alter(object &$item) Alter an item about to be created in a queue. hook_queue_item_create(object $item) Respond to an item being created in a queue. hook_queue_number_of_items_alter(int &$count) Alter the number of items reported in a queue. hook_queue_lease_time_alter(int &$lease_time) Alter the lease time when claiming an item from a queue. hook_queue_item_claimed(object $item) Respond to an item being claimed from a queue. hook_queue_item_release(object $item) Respond to an item being released back to a queue. hook_queue_delay_time_alter(int &$delay_time) Alter the delay time when releasing an item back to a queue. hook_queue_item_delay(object $item) Respond to an item being delayed in a queue. hook_queue_item_delete(object $item) Respond to an item being deleted from a queue. hook_queue_empty() Respond to a queue being emptied. hook_queue_create() Respond to a queue being created. hook_queue_delete() Respond to a queue being deleted. hook_queue_garbage_collection() Respond to garbage collection being run on a queue.

Supporting this Module

You can buy me a coffee through GitHub Sponsors or Ko-fi if you want to support my work.

Activity

Total releases
1
First release
Feb 2026
Latest release
5 months ago
Releases (12 mo)
1 ▲ from 0
Maintenance
Active

Releases

Version Type Release date
1.0.x-dev Dev Feb 4, 2026