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
log issue while maintenance
Signed-off-by: Maxence Lange <[email protected]>
  • Loading branch information
ArtificialOwl committed Mar 17, 2025
commit d8e143fa0e20d418629d2a2910abf0b02a8abbc5
4 changes: 4 additions & 0 deletions lib/Command/CirclesMaintenance.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
use OCA\Circles\Service\MaintenanceService;
use OCA\Circles\Service\OutputService;
use OCP\IDBConnection;
use Psr\Log\LoggerInterface;
use Symfony\Component\Console\Helper\QuestionHelper;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
Expand All @@ -35,6 +36,7 @@ public function __construct(
private MaintenanceService $maintenanceService,
private OutputService $outputService,
private IDBConnection $dbConnection,
private LoggerInterface $logger,
) {
parent::__construct();
}
Expand Down Expand Up @@ -135,6 +137,8 @@ protected function execute(InputInterface $input, OutputInterface $output): int
try {
$this->maintenanceService->runMaintenance($i, $input->getOption('force-refresh'));
} catch (MaintenanceException $e) {
$this->logger->warning('issue while performing maintenance', ['level' => $i, ['exception' => $e]]);
$output->writeln('- <error>issue while performing maintenance</error> ' . $e->getMessage() . ' (more details in logs)');
}
}

Expand Down
Loading