Get a failed job instance.

@param  string  $id
@return mixed
13257
public function show($id)
    {
        return (array) $this->jobs->getJobs([$id])->map(function ($job) {
            return $this->decode($job);
        })->first();
    }
720601
public function getTask($id): Task
    {
        @trigger_error(sprintf('The %s() method is deprecated since version 0.8. Use get() instead.', __METHOD__), E_USER_DEPRECATED);

        return $this->get($id);
    }
88645
public function get($id)
    {
        if (false === $this->has($id)) {
            $errMsg = sprintf('Invalid create %s', $id);
            throw new Exception\NotFoundDoctrineObjectHydratorException($errMsg);
        }

        return clone $this->prototype[$id];
    }
794746
public function retrieveEmployee($id)
    {
        list($response, $statusCode, $httpHeader) = $this->retrieveEmployeeWithHttpInfo ($id);
        return $response; 
    }
1336177
public function getJobState($id)
    {
		$url = $this->service_url . '/jobs/' . $id . '/state';
		$data = $this->service->prepAndSend($url, array(200), 'GET', null, true, 'application/json', 'application/json');
		return JobState::createFromJSON(json_decode($data));
	}
300781
public function deletable($id)
    {
        $record = $this->modelRepository->findOrFail($id);

        if ( ! $this->isModelDeletable($record)) {
            return $this->failureResponse(
                $this->getLastUnmetDeleteConditionMessage()
            );
        }

        return $this->successResponse();
    }
994970
public function get($id)
    {
        $site = $this->getCurrentSite();

        $result = $this->buildSiteApiResponse($site);

        return new ApiJsonModel($result, 0, 'Success');
    }
601966
public function find($id)
    {
        if ($attributes = $this->backend->find($id)) {
            return $this->deserializeJob($attributes);
        }
    }
1323795
public function actionStop($id)
    {
        if (!$this->module->canExecStop) {
            throw new ForbiddenHttpException(Module::t('notice', 'Stop is forbidden.'));
        }

        $record = $this->findRecord($id);

        if ($record->isStopped()) {
            return $this
                ->error(Module::t('notice', 'The job is already stopped.'))
                ->redirect(['view-details', 'id' => $record->id]);
        }

        if (!$record->canStop()) {
            return $this
                ->error(Module::t('notice', 'The job is already done.'))
                ->redirect(['view-attempts', 'id' => $record->id]);
        }

        $record->stop();

        return $this
            ->success(Module::t('notice', 'The job will be stopped.'))
            ->redirect(['view-details', 'id' => $record->id]);
    }
557996
public static function getInstance($id = 'default')
    {
        if (!isset(static::$instances[$id])) {
            static::$instances[$id] = new self();
        }
        
        return static::$instances[$id];
    }
629891
protected function getFailedJobs()
    {
        $failed = $this->app['queue.failer']->all();

        return collect($failed)->map(function ($failed) {
            return $this->parseFailedJob((array) $failed);
        })->filter()->all();
    }
62333
public function edit($id = null) {
		$queuedJob = $this->QueuedJobs->get($id, [
			'contain' => []
		]);
		if ($queuedJob->completed) {
			$this->Flash->error(__('The queued job is already completed.'));
			return $this->redirect(['action' => 'index']);
		}

		if ($this->request->is(['patch', 'post', 'put'])) {
			$queuedJob = $this->QueuedJobs->patchEntity($queuedJob, $this->request->getData());
			if ($this->QueuedJobs->save($queuedJob)) {
				$this->Flash->success(__('The queued job has been saved.'));
				return $this->redirect(['action' => 'index']);
			}

			$this->Flash->error(__('The queued job could not be saved. Please try again.'));
		}

		$this->set(compact('queuedJob'));
	}
283645
public function getAction($id)
    {
        $manager = $this->getTaskManager();

        return $this->handleView($this->view($manager->findById($id)));
    }
1015361
public function get($id)
    {
        if (isset($this->objects[$id])) {
            return $this->objects[$id];
        } else {
            return false;
        }
    }
307087
public function getServiceById($id)
    {
        if ($name = $this->getServiceNameById($id)) {
            return $this->getService($name);
        }

        return null;
    }
397874
public function getEmployeeWage($id)
    {
        list($response, $statusCode, $httpHeader) = $this->getEmployeeWageWithHttpInfo ($id);
        return $response; 
    }
947800
public function destroy($id)
    {
        $record = $this->modelRepository->findOrFail($id);

        if ( ! $this->isModelDeletable($record)) {
            return $this->failureResponse(
                $this->getLastUnmetDeleteConditionMessage()
            );
        }

        event( new Events\DeletingModelInCms($record) );

        if ( ! $this->deleteModel($record)) {
            // @codeCoverageIgnoreStart
            return $this->failureResponse(
                cms_trans('models.delete.failure.unknown')
            );
            // @codeCoverageIgnoreEnd
        }

        event( new Events\ModelDeletedInCms($this->getModelInformation()->modelClass(), $id) );

        if (request()->ajax()) {
            return response()->json([
                'success' => true,
            ]);
        }

        cms_flash(
            cms_trans(
                'models.delete.success-message',
                [ 'record' => $this->getSimpleRecordReference($id, $record) ]
            ),
            FlashLevel::SUCCESS
        );

        return redirect()->back();
    }