protected function execute(InputInterface $input, OutputInterface $output) { $this->repair->listen('\\OC\\Repair', 'step', function ($description) use($output) { $output->writeln(' - ' . $description); }); $this->repair->run(); }
protected function execute(InputInterface $input, OutputInterface $output) { $includeExpensive = $input->getOption('include-expensive'); if ($includeExpensive) { foreach ($this->repair->getExpensiveRepairSteps() as $step) { $this->repair->addStep($step); } } $maintenanceMode = $this->config->getSystemValue('maintenance', false); $this->config->setSystemValue('maintenance', true); $this->repair->listen('\\OC\\Repair', 'step', function ($description) use($output) { $output->writeln(' - ' . $description); }); $this->repair->listen('\\OC\\Repair', 'info', function ($description) use($output) { $output->writeln(' - ' . $description); }); $this->repair->listen('\\OC\\Repair', 'warning', function ($description) use($output) { $output->writeln(' - WARNING: ' . $description); }); $this->repair->listen('\\OC\\Repair', 'error', function ($description) use($output) { $output->writeln(' - ERROR: ' . $description); }); $this->repair->run(); $this->config->setSystemValue('maintenance', $maintenanceMode); }
protected function execute(InputInterface $input, OutputInterface $output) { $maintenanceMode = $this->config->getSystemValue('maintenance', false); $this->config->setSystemValue('maintenance', true); $this->repair->listen('\\OC\\Repair', 'step', function ($description) use($output) { $output->writeln(' - ' . $description); }); $this->repair->listen('\\OC\\Repair', 'info', function ($description) use($output) { $output->writeln(' - ' . $description); }); $this->repair->listen('\\OC\\Repair', 'error', function ($description) use($output) { $output->writeln(' - ERROR: ' . $description); }); $this->repair->run(); $this->config->setSystemValue('maintenance', $maintenanceMode); }
protected function execute(InputInterface $input, OutputInterface $output) { // TODO: inject DB connection/factory when possible $connection = \OC_DB::getConnection(); $connection->disableQueryStatementCaching(); $maintenanceMode = $this->config->getValue('maintenance', false); $this->config->setValue('maintenance', true); $this->repair->listen('\\OC\\Repair', 'step', function ($description) use($output) { $output->writeln(' - ' . $description); }); $this->repair->listen('\\OC\\Repair', 'info', function ($description) use($output) { $output->writeln(' - ' . $description); }); $this->repair->listen('\\OC\\Repair', 'error', function ($description) use($output) { $output->writeln(' - ERROR: ' . $description); }); $this->repair->run(); $this->config->setValue('maintenance', $maintenanceMode); }
/** * Forward messages emitted by the repair routine * * @param Repair $repair repair routine */ private function emitRepairMessages(Repair $repair) { $repair->listen('\OC\Repair', 'warning', function ($description) { $this->emit('\OC\Updater', 'repairWarning', array($description)); }); $repair->listen('\OC\Repair', 'error', function ($description) { $this->emit('\OC\Updater', 'repairError', array($description)); }); $repair->listen('\OC\Repair', 'info', function ($description) { $this->emit('\OC\Updater', 'repairInfo', array($description)); }); $repair->listen('\OC\Repair', 'step', function ($description) { $this->emit('\OC\Updater', 'repairStep', array($description)); }); }