public function delete(Job $job) { if (!$job instanceof ResqueJob) { throw new WrongJobException('Resque queue manager can only delete resque jobs'); } if (!$job->isFutureJob()) { throw new NoSuchJobException('Resque queue manager can only delete future jobs'); } if ($this->debug) { return; } if (\ResqueScheduler::removeDelayedJobFromTimestamp($job->getWhen(), $job->getQueue(), $job->getClass(), $job->getResqueArguments(), $job->isTrackStatus()) < 1) { throw new NoSuchJobException('No jobs were found'); } }