Returns a job.

@param string $jobId
@return array
@throws SmartlingApiException
558450
public function getJob($jobId)
    {
        $requestData = $this->getDefaultRequestData('query', []);
        return $this->sendRequest('jobs/' . $jobId, $requestData, self::HTTP_METHOD_GET);
    }
111086
public function getJob($listId, $jobId)
    {
        $response = $this->mailjet->get(Resources::$ContactslistManagemanycontacts, ['id' => $listId, 'actionid' => $jobId]);
        if (!$response->success()) {
            $this->throwError("ContactsListSynchronizer:getJob() failed", $response);
        }

        return $response->getData();
    }
904935
public static JobMetrics get(String jobName, String jobId) {
    return get(new JobState(jobName, jobId));
  }
648120
public function job()
    {
        $job = $this->resque->getClient()->get($this->getJobKey());

        if (!$job) {
            return array();
        } else {
            return json_decode($job, true);
        }
    }
1168667
public function getJob($command, array $args = [])
    {
        if (null !== $job = $this->findJob($command, $args)) {
            return $job;
        }

        throw new \RuntimeException(sprintf('Found no job for command "%s" with args "%s".', $command, json_encode($args)));
    }
428332
protected function getOrMake(string $name) : JobInterface
    {
        $value = $this->jobs[$name];

        if ($value instanceof JobInterface) {
            return $value;
        }

        if (is_string($value)) {
            $reflectionClass = new ReflectionClass($value);

            $job = $reflectionClass->newInstance(); // Create instance
        } else {
            /** @var Closure $value */
            $job = $value(); // Execute closure
        }

        if (! $job instanceof JobInterface) {
            throw new JobException("Object '$name' is not a job!");
        }

        $this->jobs[$name] = $job;

        return $job;
    }
131025
public function getJob($name)
    {
        foreach ($this->getJobs() as $job) {
            if ($job->getName() === $name) {
                return $job;
            }
        }
    }
420001
public function deferredDispatch($jobId, $command)
    {
        $exception = null;
        $currentCommandLogger = null;
        if ($this->logger) {
            $jobMetadata = array(
                'job_id' => $jobId,
            );
            $currentCommandLogger = new ContextEnrichingLogger(
                $this->logger,
                $jobMetadata
            );
        }

        if ($currentCommandLogger) {
            $currentCommandLogger->info('job_started');
        }

        if ($this->decoratee instanceof LoggerAwareInterface) {
            $this->decoratee->setLogger($currentCommandLogger);
        }

        try {
            parent::dispatch($command);
        } catch (\Exception $e) {
            if ($currentCommandLogger) {
                $currentCommandLogger->error('job_failed');

                $currentCommandLogger->debug(
                    'exception caused job failure',
                    ['exception' => $e]
                );
            }
            $exception = $e;
        }

        $this->setContext(null);

        if ($currentCommandLogger) {
            $currentCommandLogger->info('job_finished');
        }

        if ($exception) {
            throw $exception;
        }
    }
482794
public function findRootJobByOwnerIdAndJobName($ownerId, $jobName)
    {
        $qb = $this->getEntityRepository()->createQueryBuilder('job');

        return $qb
            ->where('job.ownerId = :ownerId AND job.name = :jobName')
            ->setParameters([
                'ownerId' => $ownerId,
                'jobName' => $jobName,
            ])
            ->getQuery()->getOneOrNullResult()
        ;
    }
304387
public function getJob($job_id) {
        if (!$this->job_pool->has($job_id)) {
            $job = $this->job_data->find($job_id);

            // bugfix - class can\'t start with backslash
            $job->runner_class = trim($job->runner_class, '\\');

            $this->job_pool->add($job);
        }

        $job = $this->job_pool->get($job_id);

        return $job;
    }
1067063
public function getCredentialsByApplicationId($applicationId)
    {
        return $this->createCommand()
            ->setRequest(
                $this->client->get(Url::factory('application')->setQuery(array('applicationId' => $applicationId)))
            )
            ->setResponseClass('Maba\OAuthCommerceInternalClient\Entity\ApplicationPassword[]')
        ;
    }
397305
public function findJobById($id)
    {
        return $this->createJobQueryBuilder('job')
            ->addSelect('rootJob')
            ->leftJoin('job.rootJob', 'rootJob')
            ->where('job = :id')
            ->setParameter('id', $id)
            ->getQuery()
            ->getOneOrNullResult();
    }
1066519
public GetThumbnailJobResponse getThumbnailJob(String jobId) {
        GetThumbnailJobRequest request = new GetThumbnailJobRequest().withJobId(jobId);
        
        return getThumbnailJob(request);
    }
1036956
private function getJobFromRow(array $row)
    {
        $type = $row['type'];

        /** @var Job $job */
        $job = new $type($this->jsonDecode($row['data']));
        $job->setChannel($row['channel']);
        $job->setBatchId($row['batch_id']);
        $job->setQueue($this, (integer) $row['id']);

        return $job;
    }
833148
private function getNodePrefixFromJobId($jobId)
    {
        $nodePrefix = substr(
            $jobId,
            JobsResponse::ID_NODE_PREFIX_START,
            Node::PREFIX_LENGTH
        );

        return $nodePrefix;
    }
501064
protected function launchJob($jobID)
        {
            $pid = pcntl_fork();
            if ($pid == -1) {
                error_log('Could not launch new job, exiting');
                echo 'Could not launch new job, exiting';
                return false;
            } else if ($pid) {
                $this->currentJobs[$pid] = $jobID;
                if (isset($this->signalQueue[$pid])) {
                    $this->childSignalHandler(SIGCHLD, $pid, $this->signalQueue[$pid]);
                    unset($this->signalQueue[$pid]);
                }
            } else {
                $exitStatus = 0; //Error code if you need to or whatever
                exit($exitStatus);
            }
            return true;
        }
1177567
protected function getJobIds()
    {
        $ids = (array) $this->input->getArgument('id');

        if (count($ids) === 1 && $ids[0] === 'all') {
            $ids = Arr::pluck($this->app['queue.failer']->all(), 'id');
        }

        return $ids;
    }