Version 1.2 (checked in on 2010/05/28 at 05:47:01 by rfay)
Examples demonstrating the Drupal Queue API.
The Queue API provides a traditional FIFO (first-in-first-out) queue, but also provides the concepts of:
This example demonstrates only basic queue functionality, and will use the default queue implementation, which is SystemQueue, managed using persistent database storage.
Further resources include the limited documentation and Batch vs Queue Presentation slides by John VanDyk and session video.
| Name | Description |
|---|---|
| queue_example_add_remove_form | Provides an interface to add items to the queue, to retrieve (claim) an item from the head of the queue, and to claim and delete. Also allows the user to run cron manually, so that claimed items can be released. |
| queue_example_add_remove_form_claim | Submit function for the "claim" button. Claims (retrieves) an item from the queue and reports the results. |
| queue_example_add_remove_form_clear_queue | Submit handler for clearing/deleting the queue. |
| queue_example_add_remove_form_delete | Submit function for "Claim and delete" button. |
| queue_example_add_remove_form_insert | Submit function for the insert-into-queue button. |
| queue_example_add_remove_form_run_cron | Submit function for "run cron" button. |
| queue_example_menu | Implements hook_menu(). |
| queue_example_retrieve_queue | Retrieve the queue from the database for display purposes only. |
| queue_example_theme | Implements hook_theme(). |
| theme_queue_items | Theme the queue display. |