tidy up code in Command namespace
This commit is contained in:
parent
6431ef501e
commit
5178c4c229
|
@ -46,7 +46,7 @@ class CreateAdminCommand extends Command
|
|||
if (empty($adminEmail)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
$adminPass = $this->ask('Admin password: ');
|
||||
$adminName = $this->ask('Admin name: ');
|
||||
|
||||
|
@ -64,7 +64,7 @@ class CreateAdminCommand extends Command
|
|||
} catch (\Exception $ex) {
|
||||
print 'There was a problem creating your account. :(' . PHP_EOL;
|
||||
print $ex->getMessage();
|
||||
print PHP_EOL;
|
||||
print PHP_EOL;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -36,6 +36,16 @@ class DaemoniseCommand extends Command
|
|||
*/
|
||||
protected $output;
|
||||
|
||||
/**
|
||||
* @var boolean
|
||||
*/
|
||||
protected $run;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
protected $sleep;
|
||||
|
||||
/**
|
||||
* @param \Monolog\Logger $logger
|
||||
* @param string $name
|
||||
|
@ -67,14 +77,14 @@ class DaemoniseCommand extends Command
|
|||
$this->sleep = 0;
|
||||
$runner = new RunCommand($this->logger);
|
||||
|
||||
$in = new ArgvInput(array());
|
||||
$emptyInput = new ArgvInput(array());
|
||||
|
||||
while ($this->run) {
|
||||
|
||||
$buildCount = 0;
|
||||
|
||||
try {
|
||||
$buildCount = $runner->run($in, $output);
|
||||
$buildCount = $runner->run($emptyInput, $output);
|
||||
} catch (\Exception $e) {
|
||||
var_dump($e);
|
||||
}
|
||||
|
|
|
@ -80,7 +80,9 @@ class PollCommand extends Command
|
|||
$this->logger->info("Last commit to github for " . $project->getTitle() . " is " . $last_commit);
|
||||
|
||||
if ($project->getLastCommit() != $last_commit && $last_commit != "") {
|
||||
$this->logger->info("Last commit is different from database, adding new build for " . $project->getTitle());
|
||||
$this->logger->info(
|
||||
"Last commit is different from database, adding new build for " . $project->getTitle()
|
||||
);
|
||||
|
||||
$build = new Build();
|
||||
$build->setProjectId($project->getId());
|
||||
|
@ -101,4 +103,3 @@ class PollCommand extends Command
|
|||
$this->logger->addInfo("Finished processing builds");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue