add option to disable notify self check

Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
Robin Appelman 2020-09-23 15:16:16 +02:00
parent 97f6388df2
commit c8a0ac921b
No known key found for this signature in database
GPG Key ID: 42B69D8A64526EFB
1 changed files with 10 additions and 1 deletions

View File

@ -93,6 +93,11 @@ class Notify extends Base {
InputOption::VALUE_REQUIRED,
'The directory in the storage to listen for updates in',
'/'
)->addOption(
'no-self-check',
'',
InputOption::VALUE_NONE,
'Disable self check on startup'
);
parent::configure();
}
@ -179,7 +184,11 @@ class Notify extends Base {
$path = trim($input->getOption('path'), '/');
$notifyHandler = $storage->notify($path);
$this->selfTest($storage, $notifyHandler, $verbose, $output);
if (!$input->getOption('no-self-check')) {
$this->selfTest($storage, $notifyHandler, $verbose, $output);
}
$notifyHandler->listen(function (IChange $change) use ($mount, $verbose, $output) {
if ($verbose) {
$this->logUpdate($change, $output);