* @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ use PrestaShop\Module\PsEventbus\Service\ApiHealthCheckService; use PrestaShop\Module\PsEventbus\Service\CommonService; if (!defined('_PS_VERSION_')) { exit; } class ps_EventbusApiHealthCheckModuleFrontController extends ModuleFrontController { /** * @return void * * @throws\PrestaShopException */ public function postProcess() { /** @var string $jobId */ $jobId = Tools::getValue('job_id'); /** @var Ps_eventbus $module */ $module = Module::getInstanceByName('ps_eventbus'); /** @var ApiHealthCheckService $apiHealthCheckService */ $apiHealthCheckService = $module->getService(ApiHealthCheckService::class); $response = $apiHealthCheckService->getHealthCheck($jobId); CommonService::exitWithResponse($response); } }