You are here

public static function Messaging_Store::queue_expire_messages in Messaging 6.4

Remove expired messages from queue

2 calls to Messaging_Store::queue_expire_messages()
Messaging_Store::cron_process in includes/messaging_store.class.inc
Process messages on cron
Messaging_Store::queue_clean in includes/messaging_store.class.inc
Queue clean up

File

includes/messaging_store.class.inc, line 191
Database storage for the messaging framework

Class

Messaging_Store
Default storage and queueing system for Messaging

Code

public static function queue_expire_messages() {
  if ($expire_messages = variable_get('messaging_queue_expire', 0)) {
    $time = time() - $expire_messages;
    db_query('DELETE FROM {' . self::DB_TABLE . '} WHERE created < %d', $time);
    return db_affected_rows();
  }
  else {
    return 0;
  }
}