src/Queue/RedisQueue.php
function push($payload, $queue = null)
    {
        $payload  = $payload->getData();

        $uid = ($payload instanceof iPayloadQueued)
            ? $payload->getUID()
            : \Poirot\Std\generateUniqueIdentifier(24);

        if ($queue === null && $payload instanceof iPayloadQueued)
            $queue = $payload->getQueue();

        $qName = $this->_normalizeQueueName($queue);

        $time = ($payload instanceof iPayloadQueued)
            ? $time = $payload->getCreatedTimestamp()
            : time();


        $value = $this->_interchangeable()
            ->makeForward([
                'id'                => $uid,
                'payload'           => $payload,
                'created_timestamp' => $time,
        ]);

        try
        {
            $this->client->lpush($qName, $value);
        } catch (\Exception $e)
        {
            throw new exWriteError('Error While Writing To Redis Client.', $e->getCode(), $e);
        }

        $queued = new QueuedPayload($payload);
        $queued = $queued
            ->withUID($uid)
            ->withQueue($qName);

        return $queued;
    }
function push($payload, $queue = null)
    {
        $payload  = $payload->getData();

        $uid = ($payload instanceof iPayloadQueued)
            ? $payload->getUID()
            : \Poirot\Std\generateUniqueIdentifier(24);

        if ($queue === null && $payload instanceof iPayloadQueued)
            $queue = $payload->getQueue();

        $qName = $this->_normalizeQueueName($queue);

        $time = ($payload instanceof iPayloadQueued)
            ? $time = $payload->getCreatedTimestamp()
            : time();


        $value = $this->_interchangeable()
            ->makeForward([
                'id'                => $uid,
                'payload'           => $payload,
                'created_timestamp' => $time,
        ]);

        try
        {
            $this->client->lpush($qName, $value);
        } catch (\Exception $e)
        {
            throw new exWriteError('Error While Writing To Redis Client.', $e->getCode(), $e);
        }

        $queued = new QueuedPayload($payload);
        $queued = $queued
            ->withUID($uid)
            ->withQueue($qName);

        return $queued;
    }
Push To Queue

@param iPayload $payload Serializable payload
@param string $queue

@return iPayloadQueued
@throws exIOError