From a79f9605b4bfcae2a05f80add087b27929da2d90 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Wed, 23 Sep 2020 15:16:16 +0200 Subject: add option to disable notify self check Signed-off-by: Robin Appelman --- apps/files_external/lib/Command/Notify.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'apps/files_external/lib/Command') diff --git a/apps/files_external/lib/Command/Notify.php b/apps/files_external/lib/Command/Notify.php index 0718b0eee66..6537e94832c 100644 --- a/apps/files_external/lib/Command/Notify.php +++ b/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); -- cgit v1.2.3