You are here

function queue_ui_test_process in Queue UI 6

Same name and namespace in other branches
  1. 7.2 queue_ui.module \queue_ui_test_process()
  2. 7 queue_ui.module \queue_ui_test_process()
1 string reference to 'queue_ui_test_process'
queue_ui_queue_info in ./queue_ui.module

File

./queue_ui.module, line 139
queue_ui.module

Code

function queue_ui_test_process($queue) {
  $count = $queue
    ->numberOfItems();
  for ($i = 0; $i < 20 && $count > 0; $i++) {
    $item = $queue
      ->claimItem(20);

    // Lease time.
    if ($item) {

      // We would do some processing, if this were REAL.
      $queue
        ->deleteItem($item);
      $count--;
    }
  }
}