protected function failed()
    {
        $retryCount = $this->model->getTriedCount() + 1;

        if ($retryCount >= $this->getMaxRetryCount()) {
            $this->model->setStatus(JobsConst::JOB_STATUS_FAILED);
        } else {
            $this->model->setStatus(JobsConst::JOB_STATUS_WAITING_RETRY);
            $this->model->setTryAt($this->getNextTryTime());
        }
        $this->model->setTriedCount($retryCount);

        return $this->model->persist();
    }