roomDocumentIngestionService = $roomDocumentIngestionService; $this->roomImageIngestionService = $roomImageIngestionService; $this->logger = $logger; $this->setInterval(86400); $this->setTimeSensitivity(self::TIME_INSENSITIVE); } /** * @param array $arguments */ protected function run($arguments): void { try { $deleted = $this->roomDocumentIngestionService->cleanupStaleDocuments(); $deletedImages = $this->roomImageIngestionService->cleanupStaleImages(); $this->logger->info('EducAI: Cleaned up stale room documents and images', [ 'deleted_documents' => $deleted, 'deleted_images' => $deletedImages, ]); } catch (\Throwable $e) { $this->logger->error('EducAI: Failed to cleanup room documents/images', [ 'exception' => $e, ]); } } }