]> source.dussan.org Git - nextcloud-server.git/commitdiff
add option to disable notify self check 23438/head
authorRobin Appelman <robin@icewind.nl>
Wed, 23 Sep 2020 13:16:16 +0000 (15:16 +0200)
committerRobin Appelman <robin@icewind.nl>
Wed, 14 Oct 2020 12:06:40 +0000 (14:06 +0200)
Signed-off-by: Robin Appelman <robin@icewind.nl>
apps/files_external/lib/Command/Notify.php

index 0718b0eee66ecfd9145c973255eb8344c79457cf..6537e94832c5ef9bddc30449ba6b717f1258d9ae 100644 (file)
@@ -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);