accountService = $accountService; $this->cacheActorService = $cacheActorService; $this->documentService = $documentService; $this->hashtagService = $hashtagService; } protected function configure() { parent::configure(); $this->setName('social:cache:refresh') ->setDescription('Update the cache') ->addOption('force', 'f', InputOption::VALUE_NONE, 'enforce update of cached account'); } /** * @throws Exception */ protected function execute(InputInterface $input, OutputInterface $output): int { // $result = $this->accountService->blindKeyRotation(); // $output->writeLn($result . ' key pairs refreshed'); $result = $this->accountService->manageDeletedActors(); $output->writeLn($result . ' local accounts deleted'); $result = $this->accountService->manageCacheLocalActors(); $output->writeLn($result . ' local accounts regenerated'); $result = $this->cacheActorService->missingCacheRemoteActors(); $output->writeLn($result . ' remote accounts created'); $result = $this->cacheActorService->manageCacheRemoteActors($input->getOption('force')); $output->writeLn($result . ' remote accounts updated'); $result = $this->cacheActorService->manageDetailsRemoteActors($input->getOption('force')); $output->writeLn($result . ' remote accounts details updated'); $result = $this->documentService->manageCacheDocuments(); $output->writeLn($result . ' documents cached'); $result = $this->hashtagService->manageHashtags(); $output->writeLn($result . ' hashtags updated'); return 0; } }