Container->get(AddProductToImportListProcess::class); } if ($actionCode == AffiliateCheckProcess::ACTION_CODE) { return $this->Container->get(AffiliateCheckProcess::class); } if ($actionCode == MigrateAlicdnUrlProcess::ACTION_CODE) { return $this->Container->get(MigrateAlicdnUrlProcess::class); } throw new Exception('Unknown process given: ' . $actionCode); } public function getAll(): array { $codes = [ ApplyPricingRulesProcess::ACTION_CODE, ImportProcess::ACTION_CODE, AddProductToImportListProcess::ACTION_CODE, AffiliateCheckProcess::ACTION_CODE, ]; $jobs = []; foreach ($codes as $code) { try { $jobs[] = $this->createProcessByCode($code); } catch (Throwable $e) { a2wl_info_log("[BackgroundProcessFactory] Failed to resolve '{$code}': " . $e->getMessage()); } } return $jobs; } }