src/Queue/MongoQueue.php
private function createEnvelope(JobInterface $job, array $options = [])
    {
        $scheduled = $this->parseOptionsToDateTime($options);
        $tried     = isset($options['tried']) ? (int) $options['tried'] : null;
        $message   = isset($options['message']) ? $options['message'] : null;
        $trace     = isset($options['trace']) ? $options['trace'] : null;

        $envelope = [
            'queue'     => $this->getName(),
            'status'    => self::STATUS_PENDING,
            'tried'     => $tried,
            'message'   => $message,
            'trace'     => $trace,
            'created'   => $this->dateTimeToUTCDateTime($this->now),
            'data'      => $this->serializeJob($job),
            'scheduled' => $this->dateTimeToUTCDateTime($scheduled),
            'priority'  => isset($options['priority']) ? $options['priority'] : self::DEFAULT_PRIORITY,
        ];

        return $envelope;
    }
private function createEnvelope(JobInterface $job, array $options = [])
    {
        $scheduled = $this->parseOptionsToDateTime($options);
        $tried     = isset($options['tried']) ? (int) $options['tried'] : null;
        $message   = isset($options['message']) ? $options['message'] : null;
        $trace     = isset($options['trace']) ? $options['trace'] : null;

        $envelope = [
            'queue'     => $this->getName(),
            'status'    => self::STATUS_PENDING,
            'tried'     => $tried,
            'message'   => $message,
            'trace'     => $trace,
            'created'   => $this->dateTimeToUTCDateTime($this->now),
            'data'      => $this->serializeJob($job),
            'scheduled' => $this->dateTimeToUTCDateTime($scheduled),
            'priority'  => isset($options['priority']) ? $options['priority'] : self::DEFAULT_PRIORITY,
        ];

        return $envelope;
    }
Create a mongo document.

@param JobInterface $job
@param array        $options

@return array