1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-01-02 02:40:58 +01:00

Remove "daemons not running" code from Repositories

Summary: This moved into Diffusion in D7458 and is now presented in a much cleaner, more targeted way.

Test Plan: Loaded `/repository/`.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D7459
This commit is contained in:
epriestley 2013-10-30 13:15:41 -07:00
parent 2d01da14fd
commit 5ef4954a36
2 changed files with 0 additions and 43 deletions

View file

@ -21,46 +21,4 @@ abstract class PhabricatorRepositoryController extends PhabricatorController {
return $response->setContent($page->render());
}
private function isPullDaemonRunning() {
$daemons = id(new PhabricatorDaemonLogQuery())
->setViewer(PhabricatorUser::getOmnipotentUser())
->withStatus(PhabricatorDaemonLogQuery::STATUS_ALIVE)
->withDaemonClasses(array('PhabricatorRepositoryPullLocalDaemon'))
->setLimit(1)
->execute();
return (bool)$daemons;
}
protected function renderDaemonNotice() {
$documentation = phutil_tag(
'a',
array(
'href' => PhabricatorEnv::getDoclink(
'article/Diffusion_User_Guide.html'),
),
'Diffusion User Guide');
$common = hsprintf(
"Without this daemon, Phabricator will not be able to import or update ".
"repositories. For instructions on starting the daemon, see %s.",
phutil_tag('strong', array(), $documentation));
$daemon_running = $this->isPullDaemonRunning();
if ($daemon_running) {
return null;
}
$title = "Repository Daemon Not Running";
$message = hsprintf(
"<p>The repository daemon is not running. %s</p>",
$common);
$view = new AphrontErrorView();
$view->setSeverity(AphrontErrorView::SEVERITY_WARNING);
$view->setTitle($title);
$view->appendChild($message);
return $view;
}
}

View file

@ -143,7 +143,6 @@ final class PhabricatorRepositoryListController
return $this->buildStandardPageResponse(
array(
$this->renderDaemonNotice(),
$panel,
$project_panel,
),