You are here

function notifications_exit in Notifications 5

Same name and namespace in other branches
  1. 6.4 notifications.module \notifications_exit()
  2. 6 notifications.module \notifications_exit()
  3. 6.2 notifications.module \notifications_exit()
  4. 6.3 notifications.module \notifications_exit()

Implementation of hook_exit()

This is where the inmediate sending is done if enabled, so we are sure all other modules have finished node processing when node update.

File

./notifications.module, line 326
Notifications module

Code

function notifications_exit() {
  global $notifications_send_inmediate;
  if (!empty($notifications_send_inmediate)) {
    require_once drupal_get_path('module', 'notifications') . '/notifications.cron.inc';
    foreach ($notifications_send_inmediate as $eid) {
      notifications_process_rows(array(
        'cron' => 1,
        'eid' => $eid,
        'send_interval' => 0,
      ));
    }
  }
}