src/IronWorker.php
public function retryTask($task_id, $delay = 1)
    {
        if (empty($task_id)) {
            throw new \InvalidArgumentException("Please set task_id");
        }
        $url = "projects/{$this->project_id}/tasks/$task_id/retry";
        $request = array('delay' => $delay);

        $this->setCommonHeaders();
        $res = json_decode($this->apiCall(self::POST, $url, $request));
        return $res->tasks[0]->id;
    }
public function retryTask($task_id, $delay = 1)
    {
        if (empty($task_id)) {
            throw new \InvalidArgumentException("Please set task_id");
        }
        $url = "projects/{$this->project_id}/tasks/$task_id/retry";
        $request = array('delay' => $delay);

        $this->setCommonHeaders();
        $res = json_decode($this->apiCall(self::POST, $url, $request));
        return $res->tasks[0]->id;
    }
public function retryTask ( $ task_id , $ delay = 1 ) { if ( empty ( $ task_id ) ) { throw new \ InvalidArgumentException ( "Please set task_id" ) ; } $ url = "projects/{$this->project_id}/tasks/$task_id/retry" ; $ request = array ( 'delay' => $ delay ) ; $ this -> setCommonHeaders ( ) ; $ res = json_decode ( $ this -> apiCall ( self :: POST , $ url , $ request ) ) ; return $ res -> tasks [ 0 ] -> id ; }
Retry task.

@param string $task_id Task ID
@param int $delay The number of seconds the task should be delayed before it runs again.
@return string Retried Task ID
@throws \InvalidArgumentException
Retry task .