public function exit($id, $pid, $code, $forceRetry = false, $queueBackoffTime = null)
    {
        $this->logger->info('Job ended', [
            'exitCode' => $code,
            'pid' => $pid,
            'jobId' => $id,
            'queue' => $this->queue->getName()
        ]);

        $hash = explode(':', $id);
        $jobId = $hash[count($hash) - 1];
        try {
            $job = $this->queue->getJob($jobId);
        } catch (JobNotFoundException $e) {
            $this->logger->info('Unable to process job exit code or retry status. Job data unavailable', [
                'exitCode' => $code,
                'pid' => $pid,
                'jobId' => $job->getId(),
                'queue' => $this->queue->getName()
            ]);
            return true;
        }

        // If the job ended successfully, remove the data from redis
        if ($code === 0) {
            $this->logger->info('Job succeeded and is now complete', [
                'exitCode' => $code,
                'pid' => $pid,
                'jobId' => $job->getId(),
                'queue' => $this->queue->getName()
            ]);

            return $job->end();
        } else {
            $retry = $job->getRetry();

            // If force retry was specified, force this job to retry indefinitely
            if ($forceRetry === true) {
                $retry = true;
            }

            if ($retry === true || $retry > 0) {
                $this->logger->info('Rescheduling job', [
                    'exitCode' => $code,
                    'pid' => $pid,
                    'jobId' => $job->getId(),
                    'queue' => $this->queue->getName(),
                    'time' => \time() + $queueBackoffTime ?? 0
                ]);

                // If a retry is specified, repush the job back onto the queue with the same Job ID
                return $job->retry($queueBackoffTime);
            } else {
                $this->logger->info('Job failed', [
                    'exitCode' => $code,
                    'pid' => $pid,
                    'jobId' => $job->getId(),
                    'queue' => $this->queue->getName()
                ]);

                return $job->fail();
            }
        }

        return;
    }