Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15455470
D9176.id21802.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
D9176.id21802.diff
View Options
diff --git a/conf/default.conf.php b/conf/default.conf.php
--- a/conf/default.conf.php
+++ b/conf/default.conf.php
@@ -940,10 +940,12 @@
// Directory that the Phabricator daemons should use to store the log file
'phd.log-directory' => '/var/tmp/phd/log',
- // Number of "TaskMaster" daemons that "phd start" should start. You can
- // raise this if you have a task backlog, or explicitly launch more with
- // "phd launch <N> taskmaster".
- 'phd.start-taskmasters' => 4,
+ // Daemons that "phd start" should start.
+ 'phd.start-daemons' => array(
+ 'PhabricatorTaskmasterDaemon' => 4,
+ 'PhabricatorRepositoryPullLocalDaemon' => 1,
+ 'PhabricatorGarbageCollectorDaemon' => 1,
+ ),
// Launch daemons in "verbose" mode by default. This creates a lot of output,
// but can help debug issues. Daemons launched in debug mode with "phd debug"
diff --git a/src/applications/config/option/PhabricatorPHDConfigOptions.php b/src/applications/config/option/PhabricatorPHDConfigOptions.php
--- a/src/applications/config/option/PhabricatorPHDConfigOptions.php
+++ b/src/applications/config/option/PhabricatorPHDConfigOptions.php
@@ -21,13 +21,18 @@
->setDescription(
pht(
"Directory that the daemons should use to store log files.")),
- $this->newOption('phd.start-taskmasters', 'int', 4)
- ->setSummary(pht("Number of TaskMaster daemons to start by default."))
+ $this->newOption(
+ 'phd.start-daemons',
+ 'map<string, int | list<list<string>>>',
+ array(
+ 'PhabricatorTaskmasterDaemon' => 4,
+ 'PhabricatorRepositoryPullLocalDaemon' => 1,
+ 'PhabricatorGarbageCollectorDaemon' => 1,
+ ))
+ ->setLocked(true)
+ ->setSummary(pht('Daemons to start by default.'))
->setDescription(
- pht(
- "Number of 'TaskMaster' daemons that 'phd start' should start. ".
- "You can raise this if you have a task backlog, or explicitly ".
- "launch more with 'phd launch <N> taskmaster'.")),
+ pht('Number and type of daemons that `phd start` should start.')),
$this->newOption('phd.verbose', 'bool', false)
->setBoolOptions(
array(
diff --git a/src/applications/daemon/management/PhabricatorDaemonManagementWorkflow.php b/src/applications/daemon/management/PhabricatorDaemonManagementWorkflow.php
--- a/src/applications/daemon/management/PhabricatorDaemonManagementWorkflow.php
+++ b/src/applications/daemon/management/PhabricatorDaemonManagementWorkflow.php
@@ -229,14 +229,19 @@
}
}
- $daemons = array(
- array('PhabricatorRepositoryPullLocalDaemon', array()),
- array('PhabricatorGarbageCollectorDaemon', array()),
- );
-
- $taskmasters = PhabricatorEnv::getEnvConfig('phd.start-taskmasters');
- for ($ii = 0; $ii < $taskmasters; $ii++) {
- $daemons[] = array('PhabricatorTaskmasterDaemon', array());
+ $daemons = array();
+ $start_daemons = PhabricatorEnv::getEnvConfig('phd.start-daemons');
+
+ foreach ($start_daemons as $daemon => $spec) {
+ if (PhutilTypeSpec::getTypeOf($spec) === 'int') {
+ for ($ii = 0; $ii < $spec; $ii++) {
+ $daemons[] = array($daemon, array());
+ }
+ } else {
+ foreach ($spec as $argv) {
+ $daemons[] = array($daemon, $argv);
+ }
+ }
}
$this->willLaunchDaemons();
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Mar 31, 12:39 AM (3 w, 2 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7727705
Default Alt Text
D9176.id21802.diff (3 KB)
Attached To
Mode
D9176: Add configuration to specify additional daemons on `phd start`.
Attached
Detach File
Event Timeline
Log In to Comment