You are here

function messaging_store_queue_cleanup in Messaging 5

Same name and namespace in other branches
  1. 6 messaging.store.inc \messaging_store_queue_cleanup()
  2. 6.2 messaging.store.inc \messaging_store_queue_cleanup()
  3. 6.3 messaging.store.inc \messaging_store_queue_cleanup()

Queue clean up

  • Remove expired logs
  • @ TODO Remove expired queued messages

File

./messaging.store.inc, line 80
Database storage for the messaging framework

Code

function messaging_store_queue_cleanup() {
  if ($expire = variable_get('messaging_log_expire', 0)) {
    db_query('DELETE FROM {messaging_store} WHERE log = 1 AND queue = 0 AND sent < %d', time() - $expire);
  }
}