From de23ba0002f878fab7a80e45b84c406221a7dcd0 Mon Sep 17 00:00:00 2001 From: epriestley Date: Fri, 11 Mar 2016 15:45:17 -0800 Subject: [PATCH] Fix a minor issue in Nuance which could cause the trigger daemon to poll too often Summary: Ref T10537. Currently, when you have at least two cursors, the daemon can poll too frequently when processing the last source because it never hits the end-of-list condition. Test Plan: - Ran `bin/phd debug trigger`. - Observed huge volumes of output before change as triggers fired as fast as possible. - Observed reasonable poll frequency after change. Reviewers: chad Reviewed By: chad Maniphest Tasks: T10537 Differential Revision: https://secure.phabricator.com/D15464 --- src/infrastructure/daemon/workers/PhabricatorTriggerDaemon.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/infrastructure/daemon/workers/PhabricatorTriggerDaemon.php b/src/infrastructure/daemon/workers/PhabricatorTriggerDaemon.php index dc1ffdc936..1620c8f99a 100644 --- a/src/infrastructure/daemon/workers/PhabricatorTriggerDaemon.php +++ b/src/infrastructure/daemon/workers/PhabricatorTriggerDaemon.php @@ -411,7 +411,7 @@ final class PhabricatorTriggerDaemon } // If we haven't loaded sources yet, load them first. - if (!$this->nuanceSources) { + if (!$this->nuanceSources && !$this->nuanceCursors) { $this->anyNuanceData = false; $sources = id(new NuanceSourceQuery())