Skip to content

Commit

Permalink
(REF) UserJob - Switch numberOfItems to getStatistic()
Browse files Browse the repository at this point in the history
  • Loading branch information
totten committed Sep 3, 2022
1 parent 9d2f9cd commit 3c85f40
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CRM/Core/BAO/UserJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public static function on_civi_queue_check(\Civi\Core\Event\GenericHookEvent $e)
/** @var \CRM_Queue_Queue $queue */
$queue = $e->queue;
$userJobId = static::findUserJobId($queue->getName());
if ($userJobId && $queue->numberOfItems() < 1) {
if ($userJobId && $queue->getStatistic('total') < 1) {
$queue->setStatus('completed');
}
}
Expand Down

0 comments on commit 3c85f40

Please sign in to comment.