public function retry(RetrySchedulerInterface $retryScheduler): array
    {
        if (!$this->isRetryable()) {
            throw new class('This job cannot be retried anymore.') extends \BadMethodCallException implements ExceptionInterface {};
        }

        $cloned = clone $this;
        $cloned->retries++;

        return [$cloned, $retryScheduler->scheduleNextRetry($cloned, $cloned->retries)];
    }