Changeset View
Changeset View
Standalone View
Standalone View
src/applications/config/option/PhabricatorPHDConfigOptions.php
| <?php | <?php | ||||
| final class PhabricatorPHDConfigOptions | final class PhabricatorPHDConfigOptions | ||||
| extends PhabricatorApplicationConfigOptions { | extends PhabricatorApplicationConfigOptions { | ||||
| public function getName() { | public function getName() { | ||||
| return pht("Daemons"); | return pht('Daemons'); | ||||
| } | } | ||||
| public function getDescription() { | public function getDescription() { | ||||
| return pht("Options relating to PHD (daemons)."); | return pht('Options relating to PHD (daemons).'); | ||||
| } | } | ||||
| public function getOptions() { | public function getOptions() { | ||||
| return array( | return array( | ||||
| $this->newOption('phd.pid-directory', 'string', '/var/tmp/phd/pid') | $this->newOption('phd.pid-directory', 'string', '/var/tmp/phd/pid') | ||||
| ->setDescription( | ->setDescription( | ||||
| pht( | pht( | ||||
| "Directory that phd should use to track running daemons.")), | 'Directory that phd should use to track running daemons.')), | ||||
| $this->newOption('phd.log-directory', 'string', '/var/tmp/phd/log') | $this->newOption('phd.log-directory', 'string', '/var/tmp/phd/log') | ||||
| ->setDescription( | ->setDescription( | ||||
| pht( | pht( | ||||
| "Directory that the daemons should use to store log files.")), | 'Directory that the daemons should use to store log files.')), | ||||
| $this->newOption('phd.start-taskmasters', 'int', 4) | $this->newOption('phd.start-taskmasters', 'int', 4) | ||||
| ->setSummary(pht("Number of TaskMaster daemons to start by default.")) | ->setSummary(pht('Number of TaskMaster daemons to start by default.')) | ||||
| ->setDescription( | ->setDescription( | ||||
| pht( | pht( | ||||
| "Number of 'TaskMaster' daemons that 'phd start' should start. ". | "Number of 'TaskMaster' daemons that 'phd start' should start. ". | ||||
| "You can raise this if you have a task backlog, or explicitly ". | "You can raise this if you have a task backlog, or explicitly ". | ||||
| "launch more with 'phd launch <N> taskmaster'.")), | "launch more with 'phd launch <N> taskmaster'.")), | ||||
| $this->newOption('phd.verbose', 'bool', false) | $this->newOption('phd.verbose', 'bool', false) | ||||
| ->setBoolOptions( | ->setBoolOptions( | ||||
| array( | array( | ||||
| pht("Verbose mode"), | pht('Verbose mode'), | ||||
| pht("Normal mode"), | pht('Normal mode'), | ||||
| )) | )) | ||||
| ->setSummary(pht("Launch daemons in 'verbose' mode by default.")) | ->setSummary(pht("Launch daemons in 'verbose' mode by default.")) | ||||
| ->setDescription( | ->setDescription( | ||||
| pht( | pht( | ||||
| "Launch daemons in 'verbose' mode by default. This creates a lot ". | "Launch daemons in 'verbose' mode by default. This creates a lot ". | ||||
| "of output, but can help debug issues. Daemons launched in debug ". | "of output, but can help debug issues. Daemons launched in debug ". | ||||
| "mode with 'phd debug' are always launched in verbose mode. See ". | "mode with 'phd debug' are always launched in verbose mode. See ". | ||||
| "also 'phd.trace'.")), | "also 'phd.trace'.")), | ||||
| $this->newOption('phd.user', 'string', null) | $this->newOption('phd.user', 'string', null) | ||||
| ->setLocked(true) | ->setLocked(true) | ||||
| ->setSummary(pht("System user to run daemons as.")) | ->setSummary(pht('System user to run daemons as.')) | ||||
| ->setDescription( | ->setDescription( | ||||
| pht( | pht( | ||||
| "Specify a system user to run the daemons as. Primarily, this ". | 'Specify a system user to run the daemons as. Primarily, this '. | ||||
| "user will own the working copies of any repositories that ". | 'user will own the working copies of any repositories that '. | ||||
| "Phabricator imports or manages. This option is new and ". | 'Phabricator imports or manages. This option is new and '. | ||||
| "experimental.")), | 'experimental.')), | ||||
| $this->newOption('phd.trace', 'bool', false) | $this->newOption('phd.trace', 'bool', false) | ||||
| ->setBoolOptions( | ->setBoolOptions( | ||||
| array( | array( | ||||
| pht("Trace mode"), | pht('Trace mode'), | ||||
| pht("Normal mode"), | pht('Normal mode'), | ||||
| )) | )) | ||||
| ->setSummary(pht("Launch daemons in 'trace' mode by default.")) | ->setSummary(pht("Launch daemons in 'trace' mode by default.")) | ||||
| ->setDescription( | ->setDescription( | ||||
| pht( | pht( | ||||
| "Launch daemons in 'trace' mode by default. This creates an ". | "Launch daemons in 'trace' mode by default. This creates an ". | ||||
| "ENORMOUS amount of output, but can help debug issues. Daemons ". | "ENORMOUS amount of output, but can help debug issues. Daemons ". | ||||
| "launched in debug mode with 'phd debug' are always launched in ". | "launched in debug mode with 'phd debug' are always launched in ". | ||||
| "trace mdoe. See also 'phd.verbose'.")), | "trace mdoe. See also 'phd.verbose'.")), | ||||
| ); | ); | ||||
| } | } | ||||
| } | } | ||||