Merge pull request #23020 from nextcloud/disable-notify-self-check

add option to disable notify self check
pull/23284/head
Robin Appelman 6 years ago committed by GitHub
commit 9bdf0eed65
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 11
      apps/files_external/lib/Command/Notify.php

@ -85,6 +85,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();
}
@ -138,7 +143,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);

Loading…
Cancel
Save