public function waitForJob($url)
    {
        $jobFinished = false;
        $i = 1;
        do {
            $jobInfo = $jobInfo = $this->get($url)->send()->json();
            if (isset($jobInfo['status']) && !in_array($jobInfo['status'], ['waiting', 'processing'])) {
                $jobFinished = true;
            }
            if (!$jobFinished) {
                usleep((1 << $i) * 1000000 + rand(0, 1000000));
            }
            $i++;
        } while (!$jobFinished);

        return $jobInfo;
    }