Programming Language PHP

Namespace Oro\Component\MessageQueue\Job

Class Job

Method/Function setJobProgress

Total Examples 1

1 code examples of PHP Oro\Component\MessageQueue\Job\Job::setJobProgress extracted from open source projects

Was this example useful?
0
                                                    public function successChildJob(Job $job): void
    {
        if ($job->isRoot()) {
            throw new \LogicException(sprintf('Can\'t success root jobs. id: "%s"', $job->getId()));
        }

        $job->setStatus(Job::STATUS_SUCCESS);
        $job->setJobProgress(1);
        $job->setStoppedAt(new \DateTime());
        $this->jobManager->saveJob($job);
    }