You are here

function advancedqueue_example_init in Advanced Queue 7

Implements hook_init().

Create dummy queue items.

File

advancedqueue_example/advancedqueue_example.module, line 66
Example module for Advanced Queues module.

Code

function advancedqueue_example_init() {
  global $user;
  $queue = DrupalQueue::get('example_queue', TRUE);
  $task = array(
    'timestamp' => time(),
    'uid' => $user->uid,
  );
  $queue
    ->createItem($task);
}