Changeset View
Changeset View
Standalone View
Standalone View
src/infrastructure/daemon/PhabricatorDaemon.php
| <?php | <?php | ||||
| abstract class PhabricatorDaemon extends PhutilDaemon { | abstract class PhabricatorDaemon extends PhutilDaemon { | ||||
| protected function willRun() { | protected function willRun() { | ||||
| parent::willRun(); | parent::willRun(); | ||||
| $phabricator = phutil_get_library_root('phabricator'); | $phabricator = phutil_get_library_root('phabricator'); | ||||
| $root = dirname($phabricator); | $root = dirname($phabricator); | ||||
| require_once $root.'/scripts/__init_script__.php'; | require_once $root.'/scripts/__init_script__.php'; | ||||
| } | } | ||||
| protected function willSleep($duration) { | protected function willSleep($duration) { | ||||
| LiskDAO::closeAllConnections(); | LiskDAO::closeInactiveConnections(60); | ||||
| return; | return; | ||||
| } | } | ||||
| public function getViewer() { | public function getViewer() { | ||||
| return PhabricatorUser::getOmnipotentUser(); | return PhabricatorUser::getOmnipotentUser(); | ||||
| } | } | ||||
| Show All 31 Lines | |||||