/** * Options: * * optional values to replace when re-queuing job * * * int delay delay (in seconds) * * array data replacement data * * int priority replacement priority * * int retries replacement number of retries * * string[] tags replacement tags * * string[] depends replacement list of JIDs this job is dependent on * * string[] resources replacement list of resource IDs required before this job can be processed * * @param array $opts optional values * @return string */ public function requeue($opts = []) { $opts = array_merge(['delay' => 0, 'data' => $this->data, 'priority' => $this->priority, 'retries' => $this->getOriginalRetries(), 'tags' => $this->getTags(), 'depends' => $this->getDependencies(), 'resources' => $this->getResources(), 'interval' => $this->getInterval()], $opts); return $this->client->requeue($this->worker_name, $this->queue_name, $this->jid, $this->klass_name, json_encode($opts['data'], JSON_UNESCAPED_SLASHES), $opts['delay'], 'priority', $opts['priority'], 'tags', json_encode($opts['tags'], JSON_UNESCAPED_SLASHES), 'retries', $opts['retries'], 'depends', json_encode($opts['depends'], JSON_UNESCAPED_SLASHES), 'resources', json_encode($opts['resources'], JSON_UNESCAPED_SLASHES), 'interval', floatval($opts['interval'])); }