cron_queue_test.module 548 B

123456789101112131415161718192021222324252627
  1. <?php
  2. /**
  3. * Implements hook_cron_queue_info().
  4. */
  5. function cron_queue_test_cron_queue_info() {
  6. $queues['cron_queue_test_exception'] = array(
  7. 'worker callback' => 'cron_queue_test_exception',
  8. );
  9. $queues['cron_queue_test_callback'] = array(
  10. 'worker callback' => array('CronQueueTestCallbackClass', 'foo'),
  11. );
  12. return $queues;
  13. }
  14. function cron_queue_test_exception($item) {
  15. throw new Exception('That is not supposed to happen.');
  16. }
  17. class CronQueueTestCallbackClass {
  18. static public function foo() {
  19. // Do nothing.
  20. }
  21. }