CRM_Queue_Queue_* - Track and report `run_count` for each item
authorTim Otten <totten@civicrm.org>
Fri, 11 Feb 2022 03:32:02 +0000 (19:32 -0800)
committerTim Otten <totten@civicrm.org>
Thu, 2 Jun 2022 20:31:59 +0000 (13:31 -0700)
commitc038970446c3827c28294629e31b61eeac224fc5
treed28bb36b080a910c41f577803764f33991243eff
parentf50d43511080a5a7323d8da59f4d6dfacafc21e2
CRM_Queue_Queue_* - Track and report `run_count` for each item

Before: Whenever you `claimItem()` from the queue, it marks the item `release_time`.

After: Whenever you `claimItem()` from the queue, it marks _both_ the
`release_time` and the `run_count`.

Comments:

* This is the basis for enforcing a `retry_limit` policy.

* This doesn't require any extra queries or joins - it fits into the
  existing update query.
CRM/Queue/Queue/Memory.php
CRM/Queue/Queue/Sql.php
CRM/Queue/Queue/SqlParallel.php
tests/phpunit/CRM/Queue/QueueTest.php