Looking at the Drupal queue documentation it is not clear what the difference is between a DatabaseQueue and a BatchQueue? Are both FIFO? Will they expire? Serial meaning not concurrent processing?
Looking at the Drupal queue documentation it is not clear what the difference is between a DatabaseQueue and a BatchQueue? Are both FIFO? Will they expire? Serial meaning not concurrent processing?
From the source of Batch.php:
/**
* Defines a batch queue handler used by the Batch API.
*
* This implementation:
* - Ensures FIFO ordering.
* - Allows an item to be repeatedly claimed until it is actually deleted (no
* notion of lease time or 'expire' date), to allow multipass operations.
*
* Stale items from failed batches are cleaned from the {queue} table on cron
* using the 'created' date.
*
* @ingroup queue
*/
class Batch extends DatabaseQueue {
Batch extends DatabaseQueue. In my experience, batch is most often used with a form, as it will automatically process the batch after it's built.