You are here

function sf_notifications_release_expired_claims in Salesforce Suite 7.2

Release items which have already had their claims expired, but have not been released. Usually, this happens on cron, but we want to do it before processing clearing the queue.

3 calls to sf_notifications_release_expired_claims()
sf_notifications_cron in sf_notifications/sf_notifications.module
Implements hook_cron().
sf_notifications_empty_confirm_form_submit in sf_notifications/sf_notifications.admin.inc
sf_notifications_process_confirm_form_submit in sf_notifications/sf_notifications.admin.inc

File

sf_notifications/sf_notifications.module, line 522

Code

function sf_notifications_release_expired_claims() {

  // Reset expired sf_notifications_queue items in the queue table.
  db_update('queue')
    ->fields(array(
    'expire' => 0,
  ))
    ->condition('expire', 0, '<>')
    ->condition('expire', REQUEST_TIME, '<')
    ->condition('name', 'sf_notifications_queue')
    ->execute();
}