bridge) { $this->bridge = new Bridge(); } } function processTaskStrategy(ScheduledTask $task) { try { $result = $this->checkKey(); } catch (\Exception $e) { $result = false; } if (empty($result['code']) || $result['code'] == Bridge::CHECK_ERROR_UNAVAILABLE) { $this->reschedule($task, self::UNAVAILABLE_SERVICE_RESCHEDULE_TIMEOUT); return false; } return true; } abstract function checkKey(); }