src/ElasticsearchQueue.php
/**
     * Push a raw payload to the elasticsearch with a given delay.
     *
     * @param  \DateTime|int  $delay
     * @param  string|null  $queue
     * @param  string  $payload
     * @param  int  $attempts
     * @return mixed
     */
Push a raw payload to the elasticsearch with a given delay.
Push a raw payload to the elasticsearch with a given delay .
protected function pushToElasticsearch($delay, $queue, $payload, $attempts = 0)
    {
        $queue = $this->getQueue($queue);
        $attributes = $this->buildElasticsearchDoc(
            $queue, $payload, $this->getAvailableAt($delay), $attempts
        );
        $params['index'] = $this->index;
        $params['type'] = $queue;
        $params['id'] = $attributes['id'];
        $params['body'] = $attributes;
        $this->elasticsearch->index($params);
        return $attributes['id'];
    }
protected function pushToElasticsearch ( $ delay , $ queue , $ payload , $ attempts = 0 ) { $ queue = $ this -> getQueue ( $ queue ) ; $ attributes = $ this -> buildElasticsearchDoc ( $ queue , $ payload , $ this -> getAvailableAt ( $ delay ) , $ attempts ) ; $ params [ 'index' ] = $ this -> index ; $ params [ 'type' ] = $ queue ; $ params [ 'id' ] = $ attributes [ 'id' ] ; $ params [ 'body' ] = $ attributes ; $ this -> elasticsearch -> index ( $ params ) ; return $ attributes [ 'id' ] ; }
Push a raw payload to the elasticsearch with a given delay.
Push a raw payload to the elasticsearch with a given delay .