Skip to content

Fixed issue #32 #35

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 27, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions src/Wrep/Daemonizable/Command/EndlessCommand.php
Original file line number Diff line number Diff line change
@@ -37,6 +37,10 @@ public function __construct($name = null)
// Construct parent context (also calls configure)
parent::__construct($name);

// Merge our options
$this->addOption('run-once', null, InputOption::VALUE_NONE, 'Run the command just once, do not go into an endless loop');
$this->addOption('detect-leaks', null, InputOption::VALUE_NONE, 'Output information about memory usage');

// Set our runloop as the executable code
parent::setCode(array($this, 'runloop'));
}
@@ -46,14 +50,7 @@ public function __construct($name = null)
*/
public function run(InputInterface $input, OutputInterface $output)
{
// Force the creation of the synopsis before the merge with the app definition
$this->getSynopsis();

// Merge our options
$this->addOption('run-once', null, InputOption::VALUE_NONE, 'Run the command just once, do not go into an endless loop');
$this->addOption('detect-leaks', null, InputOption::VALUE_NONE, 'Output information about memory usage');

// Add the signal handler
// Add the signal handler
if ( function_exists('pcntl_signal') )
{
// Enable ticks for fast signal processing