Skip to content
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
add option to disable notify self check
Signed-off-by: Robin Appelman <[email protected]>
  • Loading branch information
icewind1991 committed Oct 14, 2020
commit c8a0ac921b6f006df36d2bd7458eade38344f14c
11 changes: 10 additions & 1 deletion apps/files_external/lib/Command/Notify.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,11 @@ protected function configure() {
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();
}
Expand Down Expand Up @@ -179,7 +184,11 @@ protected function execute(InputInterface $input, OutputInterface $output) {

$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);
Expand Down