src/Queue/MongoQueue.php
public function pushLazy($service, $payload = null, array $options = [])
    {
        $manager = $this->getJobPluginManager();
        $serviceOptions = [];

        if (is_array($service)) {
            $serviceOptions = $service['options'] ?? $service[1] ?? [];
            $service = $service['name'] ?? $service[0] ?? null;
        }

        if (!$manager->has($service) && !class_exists($service)) {
            throw new \UnexpectedValueException(sprintf(
                'Service name "%s" is not a known job service or existent class',
                $service
            ));
        }

        $lazyOptions = [
            'name' => $service,
            'options' => $serviceOptions,
            'content' => $payload,
        ];

        $job = $this->getJobPluginManager()->build('lazy', $lazyOptions);

        $this->push($job, $options);
    }
public function pushLazy($service, $payload = null, array $options = [])
    {
        $manager = $this->getJobPluginManager();
        $serviceOptions = [];

        if (is_array($service)) {
            $serviceOptions = $service['options'] ?? $service[1] ?? [];
            $service = $service['name'] ?? $service[0] ?? null;
        }

        if (!$manager->has($service) && !class_exists($service)) {
            throw new \UnexpectedValueException(sprintf(
                'Service name "%s" is not a known job service or existent class',
                $service
            ));
        }

        $lazyOptions = [
            'name' => $service,
            'options' => $serviceOptions,
            'content' => $payload,
        ];

        $job = $this->getJobPluginManager()->build('lazy', $lazyOptions);

        $this->push($job, $options);
    }
Push a lazy loading job in the queue.

Lazy job allows to load the actual job only when executed.

You can specify the job to load in two ways:
- as string:
The actual job will be pulled from the job manager or instantiated from a valid class name.

- as array:
If you need to pass options to the job, you can specify the
job as an array:
[ string:name, array:options ]
The actual job will be pulled from the job manager using the 'build' command,
passing the options along OR if no service for the job is defined, but a valid
class name is given, this class will be instantiated and the options are passed
as constructor arguments,

@see push()
@see LazyJob

@param string|array $service
@param mixed|null  $payload
@param array $options