summaryrefslogtreecommitdiff
path: root/modules/system/tests/cron_queue_test.module
blob: 0df6396a65dd1d908b7d9f024fdbe8b7540612ca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?php

/**
 * Implements hook_cron_queue_info().
 */
function cron_queue_test_cron_queue_info() {
  $queues['cron_queue_test_exception'] = array(
    'worker callback' => 'cron_queue_test_exception',
  );
  $queues['cron_queue_test_callback'] = array(
    'worker callback' => array('CronQueueTestCallbackClass', 'foo'),
  );

  return $queues;
}

function cron_queue_test_exception($item) {
  throw new Exception('That is not supposed to happen.');
}

class CronQueueTestCallbackClass {

  static public function foo() {
    // Do nothing.
  }

}