Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14065862
D11852.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
D11852.diff
View Options
diff --git a/src/applications/daemon/controller/PhabricatorDaemonConsoleController.php b/src/applications/daemon/controller/PhabricatorDaemonConsoleController.php
--- a/src/applications/daemon/controller/PhabricatorDaemonConsoleController.php
+++ b/src/applications/daemon/controller/PhabricatorDaemonConsoleController.php
@@ -57,7 +57,8 @@
if ($failed) {
// Add the time it takes to restart the daemons. This includes a guess
// about other overhead of 2X.
- $usage_total += PhutilDaemonOverseer::RESTART_WAIT * count($failed) * 2;
+ $restart_delay = PhutilDaemonHandle::getWaitBeforeRestart();
+ $usage_total += $restart_delay * count($failed) * 2;
foreach ($failed as $failed_task) {
$usage_start = min($usage_start, $failed_task->getFailureTime());
}
diff --git a/src/applications/daemon/controller/PhabricatorDaemonLogViewController.php b/src/applications/daemon/controller/PhabricatorDaemonLogViewController.php
--- a/src/applications/daemon/controller/PhabricatorDaemonLogViewController.php
+++ b/src/applications/daemon/controller/PhabricatorDaemonLogViewController.php
@@ -112,7 +112,7 @@
$unknown_time = PhabricatorDaemonLogQuery::getTimeUntilUnknown();
$dead_time = PhabricatorDaemonLogQuery::getTimeUntilDead();
- $wait_time = PhutilDaemonOverseer::RESTART_WAIT;
+ $wait_time = PhutilDaemonHandle::getWaitBeforeRestart();
$details = null;
$status = $daemon->getStatus();
diff --git a/src/applications/daemon/event/PhabricatorDaemonEventListener.php b/src/applications/daemon/event/PhabricatorDaemonEventListener.php
--- a/src/applications/daemon/event/PhabricatorDaemonEventListener.php
+++ b/src/applications/daemon/event/PhabricatorDaemonEventListener.php
@@ -5,28 +5,28 @@
private $daemons = array();
public function register() {
- $this->listen(PhutilDaemonOverseer::EVENT_DID_LAUNCH);
- $this->listen(PhutilDaemonOverseer::EVENT_DID_LOG);
- $this->listen(PhutilDaemonOverseer::EVENT_DID_HEARTBEAT);
- $this->listen(PhutilDaemonOverseer::EVENT_WILL_GRACEFUL);
- $this->listen(PhutilDaemonOverseer::EVENT_WILL_EXIT);
+ $this->listen(PhutilDaemonHandle::EVENT_DID_LAUNCH);
+ $this->listen(PhutilDaemonHandle::EVENT_DID_LOG);
+ $this->listen(PhutilDaemonHandle::EVENT_DID_HEARTBEAT);
+ $this->listen(PhutilDaemonHandle::EVENT_WILL_GRACEFUL);
+ $this->listen(PhutilDaemonHandle::EVENT_WILL_EXIT);
}
public function handleEvent(PhutilEvent $event) {
switch ($event->getType()) {
- case PhutilDaemonOverseer::EVENT_DID_LAUNCH:
+ case PhutilDaemonHandle::EVENT_DID_LAUNCH:
$this->handleLaunchEvent($event);
break;
- case PhutilDaemonOverseer::EVENT_DID_HEARTBEAT:
+ case PhutilDaemonHandle::EVENT_DID_HEARTBEAT:
$this->handleHeartbeatEvent($event);
break;
- case PhutilDaemonOverseer::EVENT_DID_LOG:
+ case PhutilDaemonHandle::EVENT_DID_LOG:
$this->handleLogEvent($event);
break;
- case PhutilDaemonOverseer::EVENT_WILL_GRACEFUL:
+ case PhutilDaemonHandle::EVENT_WILL_GRACEFUL:
$this->handleGracefulEvent($event);
break;
- case PhutilDaemonOverseer::EVENT_WILL_EXIT:
+ case PhutilDaemonHandle::EVENT_WILL_EXIT:
$this->handleExitEvent($event);
break;
}
diff --git a/src/applications/daemon/query/PhabricatorDaemonLogQuery.php b/src/applications/daemon/query/PhabricatorDaemonLogQuery.php
--- a/src/applications/daemon/query/PhabricatorDaemonLogQuery.php
+++ b/src/applications/daemon/query/PhabricatorDaemonLogQuery.php
@@ -13,11 +13,11 @@
private $allowStatusWrites;
public static function getTimeUntilUnknown() {
- return 3 * PhutilDaemonOverseer::HEARTBEAT_WAIT;
+ return 3 * PhutilDaemonHandle::getHeartbeatEventFrequency();
}
public static function getTimeUntilDead() {
- return 30 * PhutilDaemonOverseer::HEARTBEAT_WAIT;
+ return 30 * PhutilDaemonHandle::getHeartbeatEventFrequency();
}
public function withIDs(array $ids) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Nov 20, 6:52 AM (46 m, 53 s ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6714993
Default Alt Text
D11852.diff (3 KB)
Attached To
Mode
D11852: Update Phabricator for DaemonOverseer vs DaemonHandle split
Attached
Detach File
Event Timeline
Log In to Comment