setName('photos:update-1000-cities') ->setDescription('Update the list of 1000 and more inhabitant cities'); } /** * Execute the command */ protected function execute(InputInterface $input, OutputInterface $output): int { try { if (!$this->rgcService->arePlacesEnabled()) { throw new \Exception('Places is disabled'); } $this->rgcService->buildKDTree(true); } catch (\Exception $ex) { $output->writeln('Failed to update reverse geocoding files'); $output->writeln($ex->getMessage()); return 1; } return 0; } }