From eba51d16b9b8803780b24cc3e38c6184b0eb06d2 Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Fri, 8 Mar 2013 13:08:11 -0800 Subject: [PATCH] reduce noise on daemon console Summary: this suppresses displaying entries that have not been in the running state for more than 3 days. note: We should probably kill off these dead rows similar to the code at the top of the loop, but without checking to see if we're the same host and the item is still live, or have some other cruft removal job to effect the same. Test Plan: load /daemon/ and rejoice that there are fewer crufty rows. Reviewers: vrana, nh Reviewed By: nh CC: aran, epriestley Differential Revision: https://secure.phabricator.com/D5299 --- .../daemon/view/PhabricatorDaemonLogListView.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/applications/daemon/view/PhabricatorDaemonLogListView.php b/src/applications/daemon/view/PhabricatorDaemonLogListView.php index 47353b948f..a78e386dbe 100644 --- a/src/applications/daemon/view/PhabricatorDaemonLogListView.php +++ b/src/applications/daemon/view/PhabricatorDaemonLogListView.php @@ -66,6 +66,15 @@ final class PhabricatorDaemonLogListView extends AphrontView { $symbol = '?'; } + if ($status != PhabricatorDaemonLog::STATUS_RUNNING && + $log->getDateModified() + (3 * 86400) < time()) { + // Don't show rows that haven't been running for more than + // three days. We should probably prune these out of the + // DB similar to the code above, but we don't need to be + // conservative and do it only on the same host + continue; + } + $running = phutil_tag( 'span', array(