查看Drupal 队列文档,不清楚DatabaseQueue和BatchQueue之间有什么区别?都是先进先出吗?它们会过期吗?串行含义不是并发处理?
1 回答
0
从 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 {
批处理扩展了 DatabaseQueue。根据我的经验,batch它最常与表单一起使用,因为它会在构建后自动处理批处理。
- 是的,先进先出。
- 不,物品不会过期。
- 是的,串行处理。
于 2020-08-27T18:42:09.573 回答