mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-26 08:42:41 +01:00
Improve daemon "waiting" message, config reload behavior
Summary: Ref T12298. Two minor daemon improvements: - Make the "waiting" message reflect hibernation. - Don't trigger a reload right after launching. Test Plan: - Read "waiting" message. - Ran "bin/phd start", didn't see an immediate SIGHUP in the log. Reviewers: chad Reviewed By: chad Maniphest Tasks: T12298 Differential Revision: https://secure.phabricator.com/D17550
This commit is contained in:
parent
2707681b48
commit
f13637627d
2 changed files with 10 additions and 6 deletions
|
@ -125,12 +125,10 @@ final class PhabricatorDaemonLogViewController
|
||||||
case PhabricatorDaemonLog::STATUS_WAIT:
|
case PhabricatorDaemonLog::STATUS_WAIT:
|
||||||
$details = pht(
|
$details = pht(
|
||||||
'This daemon is running normally and reported a status update '.
|
'This daemon is running normally and reported a status update '.
|
||||||
'recently (within %s). However, it encountered an error while '.
|
'recently (within %s). The process is currently waiting to '.
|
||||||
'doing work and is waiting a little while (%s) to resume '.
|
'restart, either because it is hibernating or because it '.
|
||||||
'processing. After encountering an error, daemons wait before '.
|
'encountered an error.',
|
||||||
'resuming work to avoid overloading services.',
|
phutil_format_relative_time($unknown_time));
|
||||||
phutil_format_relative_time($unknown_time),
|
|
||||||
phutil_format_relative_time($wait_time));
|
|
||||||
break;
|
break;
|
||||||
case PhabricatorDaemonLog::STATUS_EXITING:
|
case PhabricatorDaemonLog::STATUS_EXITING:
|
||||||
$details = pht('This daemon is shutting down gracefully.');
|
$details = pht('This daemon is shutting down gracefully.');
|
||||||
|
|
|
@ -48,6 +48,12 @@ final class PhabricatorDaemonOverseerModule
|
||||||
|
|
||||||
$this->configVersion = $new_version;
|
$this->configVersion = $new_version;
|
||||||
|
|
||||||
|
// Don't trigger a reload if we're loading the config for the very
|
||||||
|
// first time.
|
||||||
|
if ($old_version === null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
return ($old_version != $new_version);
|
return ($old_version != $new_version);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue