From cdaf898b9c58db7fb9b71c6fecc178a665093373 Mon Sep 17 00:00:00 2001 From: Ricky Elrod Date: Wed, 9 Jan 2013 06:05:34 -0800 Subject: [PATCH] PHD Options. Test Plan: Looked at the options render properly. Reviewers: epriestley, btrahan, chad Reviewed By: epriestley CC: aran, Korvin Maniphest Tasks: T2255 Differential Revision: https://secure.phabricator.com/D4367 --- src/__phutil_library_map__.php | 2 + .../option/PhabricatorPHDConfigOptions.php | 60 +++++++++++++++++++ 2 files changed, 62 insertions(+) create mode 100644 src/applications/config/option/PhabricatorPHDConfigOptions.php diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php index 751c7b60d2..52d851816e 100644 --- a/src/__phutil_library_map__.php +++ b/src/__phutil_library_map__.php @@ -1019,6 +1019,7 @@ phutil_register_library_map(array( 'PhabricatorOwnersPackageQuery' => 'applications/owners/query/PhabricatorOwnersPackageQuery.php', 'PhabricatorOwnersPackageTestCase' => 'applications/owners/storage/__tests__/PhabricatorOwnersPackageTestCase.php', 'PhabricatorOwnersPath' => 'applications/owners/storage/PhabricatorOwnersPath.php', + 'PhabricatorPHDConfigOptions' => 'applications/config/option/PhabricatorPHDConfigOptions.php', 'PhabricatorPHID' => 'applications/phid/storage/PhabricatorPHID.php', 'PhabricatorPHIDConstants' => 'applications/phid/PhabricatorPHIDConstants.php', 'PhabricatorPHIDController' => 'applications/phid/controller/PhabricatorPHIDController.php', @@ -2349,6 +2350,7 @@ phutil_register_library_map(array( 'PhabricatorOwnersPackageQuery' => 'PhabricatorCursorPagedPolicyAwareQuery', 'PhabricatorOwnersPackageTestCase' => 'PhabricatorTestCase', 'PhabricatorOwnersPath' => 'PhabricatorOwnersDAO', + 'PhabricatorPHDConfigOptions' => 'PhabricatorApplicationConfigOptions', 'PhabricatorPHIDController' => 'PhabricatorController', 'PhabricatorPHIDLookupController' => 'PhabricatorPHIDController', 'PhabricatorPaste' => diff --git a/src/applications/config/option/PhabricatorPHDConfigOptions.php b/src/applications/config/option/PhabricatorPHDConfigOptions.php new file mode 100644 index 0000000000..ce0b22f7a5 --- /dev/null +++ b/src/applications/config/option/PhabricatorPHDConfigOptions.php @@ -0,0 +1,60 @@ +newOption('phd.pid-directory', 'string', '/var/tmp/phd/pid') + ->setDescription( + pht( + "Directory that phd should use to track running daemons.")), + $this->newOption('phd.log-directory', 'string', '/var/tmp/phd/log') + ->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.")) + ->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 taskmaster'.")), + $this->newOption('phd.verbose', 'bool', false) + ->setOptions( + array( + pht("Verbose mode"), + pht("Normal mode"), + )) + ->setSummary(pht("Launch daemons in 'verbose' mode by default.")) + ->setDescription( + pht( + "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' are always launched in verbose mode. See ". + "also 'phd.trace'.")), + $this->newOption('phd.trace', 'bool', false) + ->setOptions( + array( + pht("Trace mode"), + pht("Normal mode"), + )) + ->setSummary(pht("Launch daemons in 'trace' mode by default.")) + ->setDescription( + pht( + "Launch daemons in 'trace' mode by default. This creates an ". + "ENORMOUS amount of output, but can help debug issues. Daemons ". + "launched in debug mode with 'phd debug' are always launched in ". + "trace mdoe. See also 'phd.verbose'.")), + ); + } + +}