You are here

class ZoomAPISystemQueue in Zoom API 7.2

Extend SystemQueue making each item unique.

Hierarchy

Expanded class hierarchy of ZoomAPISystemQueue

1 string reference to 'ZoomAPISystemQueue'
zoomapi_update_7209 in ./zoomapi.install
Set queues to use custom system queue.

File

./zoomapi.module, line 28
Main file for the Zoom API module.

View source
class ZoomAPISystemQueue extends SystemQueue {

  /**
   * Override createItem to handle merging instead of inserting.
   */
  public function createItem($data) {
    $serial_data = serialize($data);
    $query = db_merge('queue')
      ->key([
      'name' => $this->name,
      'data' => $serial_data,
    ])
      ->fields([
      'name' => $this->name,
      'data' => $serial_data,
      'created' => REQUEST_TIME,
    ]);
    return (bool) $query
      ->execute();
  }

}

Members

Namesort descending Modifiers Type Description Overrides
SystemQueue::$name protected property The name of the queue this instance is working with.
SystemQueue::claimItem public function Claim an item in the queue for processing. Overrides DrupalQueueInterface::claimItem 1
SystemQueue::createQueue public function Create a queue. Overrides DrupalQueueInterface::createQueue
SystemQueue::deleteItem public function Delete a finished item from the queue. Overrides DrupalQueueInterface::deleteItem
SystemQueue::deleteQueue public function Delete a queue and every item in the queue. Overrides DrupalQueueInterface::deleteQueue
SystemQueue::numberOfItems public function Retrieve the number of items in the queue. Overrides DrupalQueueInterface::numberOfItems
SystemQueue::releaseItem public function Release an item that the worker could not process, so another worker can come in and process it before the timeout expires. Overrides DrupalQueueInterface::releaseItem
SystemQueue::__construct public function
ZoomAPISystemQueue::createItem public function Override createItem to handle merging instead of inserting. Overrides SystemQueue::createItem