Find a failed job by ID.

@param  string  $id
@return \stdClass|null
322648
public function findFailed($id)
    {
        $attributes = $this->connection()->hmget(
            $id, $this->keys
        );

        $job = is_array($attributes) && $attributes[0] !== null ? (object) array_combine($this->keys, $attributes) : null;

        if ($job && $job->status !== 'failed') {
            return;
        }

        return $job;
    }
13257
public function show($id)
    {
        return (array) $this->jobs->getJobs([$id])->map(function ($job) {
            return $this->decode($job);
        })->first();
    }
1370658
public function getDependencies($id)
    {
        return (isset($this->dependenciesById[$id])) ?
            $this->dependenciesById[$id] :
            null;
    }
1341309
public function findById($id)
    {
        if( is_null($id)) {
            throw new \Exception('ID is required');
        }

        try {
            $role = $this->getRepository('\erdiko\users\entities\Role');
            $result = $role->find($id);
        }catch (\Exception $e) {
            \error_log($e->getMessage());
        }
        return $result;
    }
916987
protected function retryJob($id)
	{
		$failed = $this->laravel['queue.failer']->find($id);

		if (! is_null($failed)) {
			$failed = (object) $failed;

			$failed->payload = $this->resetAttempts($failed->payload);

			$this->laravel['queue']->connection($failed->connection)
								->pushRaw($failed->payload, $failed->queue);

			$this->laravel['queue.failer']->forget($failed->id);

			$this->info("The failed job [{$id}] has been pushed back onto the queue!");
		} else {
			$this->error("No failed job matches the given ID [{$id}].");
		}
	}
330884
private function findOr404Error($id)
    {
        $translator = $this->get('translator');
        $translationDomain = $this->getParameter('symfonyid.admin.translation_domain');

        /** @var ConfiguratorFactory $configuratorFactory */
        $configuratorFactory = $this->getConfiguratorFactory($this->getClassName());
        /** @var CrudConfigurator $crudConfigurator */
        $crudConfigurator = $configuratorFactory->getConfigurator(CrudConfigurator::class);

        $modelClass = $crudConfigurator->getCrud()->getModelClass();
        $driver = $this->get('symfonyid.admin.manager.driver_finder')->findDriverForClass($modelClass);
        $crudOperationHandler = $this->get('symfonyid.admin.crud.crud_operation_handler');

        /** @var ModelInterface $model */
        $model = $crudOperationHandler->find($driver, $modelClass, $id);
        if (!$model) {
            throw new NotFoundHttpException($translator->trans('message.data_not_found', array('%id%' => $id), $translationDomain));
        }

        return $model;
    }
1273171
public function getParameterByID($id)
    {
        $param = current(array_filter($this->params, function (Param $param) use ($id) {
            return ($param->id === $id);
        }));

        return ($param) ? $param : null;
    }
298107
public function find($id)
    {
        if (empty($id)) {
            throw new \Exception('ID must be set');
        }

        $response = $this->restClient->get($this->endpoint . '/' . $id);

        return $response['body'];
    }
206610
public function get_from_id(int $id) {
        $records = $this->get_from_ids([$id]);
        return count($records) ? array_shift($records) : null;
    }
1296926
public static function find($ID = 0)
    {
        if (empty($ID) || !is_numeric($ID) || $ID <= 0) {
            return null;
        }
        global $wpdb;
        $calledClass = get_called_class();
        // Remove the Knob as possible prefix from called_class
        if (0 === strpos($calledClass, 'Knob\\')) {
            $calledClass = substr($calledClass, strpos($calledClass, '\\') + 1);
        }
        $sql = 'SELECT * FROM ' . static::getTableName() . ' WHERE ' . static::$PK . '= %d';
        if (!$row = $wpdb->get_row($wpdb->prepare($sql, $ID))) {
            return null;
        }

        $new = new $calledClass();
        foreach ($row as $column => $val) {
            $new->$column = $val;
        }

        return $new;
    }
80971
private function getAdmin($id)
    {
        $admin = $this->adminPool->getContainer()->get($id);

        if ($admin instanceof  AdminInterface) {
            return $admin;
        }

        return null;
    }
601966
public function find($id)
    {
        if ($attributes = $this->backend->find($id)) {
            return $this->deserializeJob($attributes);
        }
    }
712657
public function findById($id)
    {
        if (!array_key_exists($id, $this->bpmn2Files)) {
            return null;
        }

        $bpmn2Reader = new Bpmn2Reader();

        return $bpmn2Reader->read($this->bpmn2Files[$id]->getFile());
    }
749571
public function findByID($id, $fail = true)
    {
        if ($fail) {
            return $this->newQuery()->findOrFail($id);
        }

        return $this->newQuery()->find($id);
    }
357266
public static function getFromCache($id)
    {
        $arrayCache = Configuration::getArrayCache();
        if ($arrayCache->contains($id)) {
            return $arrayCache->fetch($id);
        }

        $cacheDriver = Configuration::getCacheDriver();
        if ($cacheDriver !== null) {
            $cacheResult = $cacheDriver->fetch($id);
            if ($cacheResult !== false) {
                $arrayCache->save($id, $cacheResult);
                return $cacheResult;
            }
        }

        return null;
    }
812442
protected function findOrFail($id)
    {
        $model = $this->model;
        if ($this->withTrashed()) {
            return $model::withTrashed()->findOrFail($id);
        } else {
            return $model::findOrFail($id);
        }
    }
95044
public function deleteFailed($id)
    {
        $this->connection()->zrem('failed_jobs', $id);

        $this->connection()->del($id);
    }