You are here

function notifications_admin_queue_process in Notifications 5

Same name and namespace in other branches
  1. 6 notifications.admin.inc \notifications_admin_queue_process()
  2. 6.2 notifications.admin.inc \notifications_admin_queue_process()
  3. 6.3 notifications.admin.inc \notifications_admin_queue_process()

Admin manual queue processing

1 call to notifications_admin_queue_process()
notifications_admin_queue in ./notifications.admin.inc
Admin queue management

File

./notifications.admin.inc, line 402

Code

function notifications_admin_queue_process($param) {
  include_once drupal_get_path('module', 'notifications') . '/notifications.cron.inc';

  // Set some running parameters
  switch ($param) {
    case 'immediate':
      notifications_process_rows(array(
        'cron' => 1,
        'send_interval' => 0,
      ));
      break;
    case 'debug':
      notifications_process('option', 'debug', TRUE);
      notifications_process('option', 'output', TRUE);
      notifications_process_run(FALSE);
      break;
    default:
      notifications_process_run(FALSE);
  }

  // Go for it, not cron run
  if ($logs = notifications_log()) {
    return theme('item_list', $logs);
  }
}