From a4642d17e0e1ea018b128efdcc3db281461458b1 Mon Sep 17 00:00:00 2001 From: Frédéric Guillot Date: Wed, 4 Apr 2018 15:21:13 -0700 Subject: Move custom libs to the source tree --- .../src/Adapter/MemoryQueueAdapter.php | 100 --------------------- 1 file changed, 100 deletions(-) delete mode 100644 vendor/fguillot/simple-queue/src/Adapter/MemoryQueueAdapter.php (limited to 'vendor/fguillot/simple-queue/src/Adapter/MemoryQueueAdapter.php') diff --git a/vendor/fguillot/simple-queue/src/Adapter/MemoryQueueAdapter.php b/vendor/fguillot/simple-queue/src/Adapter/MemoryQueueAdapter.php deleted file mode 100644 index 36375d5b..00000000 --- a/vendor/fguillot/simple-queue/src/Adapter/MemoryQueueAdapter.php +++ /dev/null @@ -1,100 +0,0 @@ -queue = new SplQueue(); - } - - /** - * Send a job - * - * @access public - * @param Job $job - * @return $this - */ - public function push(Job $job) - { - $this->queue->enqueue($job->serialize()); - return $this; - } - - /** - * Schedule a job in the future - * - * @access public - * @param Job $job - * @param DateTime $dateTime - * @return bool - * @throws NotSupportedException - */ - public function schedule(Job $job, DateTime $dateTime) - { - throw new NotSupportedException('Job delay is not supported by MemoryQueue'); - } - - /** - * Wait and get job from a queue - * - * @access public - * @return Job|null - */ - public function pull() - { - try { - $job = new Job(); - $payload = $this->queue->dequeue(); - return $job->unserialize($payload); - } catch (Exception $e) { - return null; - } - } - - /** - * Acknowledge a job - * - * @access public - * @param Job $job - * @return $this - */ - public function completed(Job $job) - { - return $this; - } - - /** - * Mark a job as failed - * - * @access public - * @param Job $job - * @return $this - */ - public function failed(Job $job) - { - $this->queue->enqueue($job->serialize()); - return $this; - } -} -- cgit v1.2.3