public static function Messaging_Store::queue_expire_logs in Messaging 6.4
Remove expired logs from queue
Parameters
$force: Whether to force removal of logs and errors (even if logging not set)
2 calls to Messaging_Store::queue_expire_logs()
- 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 177 - Database storage for the messaging framework
Class
- Messaging_Store
- Default storage and queueing system for Messaging
Code
public static function queue_expire_logs($force = FALSE) {
if (($expire_logs = variable_get('messaging_log', 0)) || $force) {
$time = time() - $expire_logs;
db_query('DELETE FROM {' . self::DB_TABLE . '} WHERE log = 1 AND queue = 0 AND sent < %d OR error = 1 AND created < %d', $time, $time);
return db_affected_rows();
}
else {
return 0;
}
}