function views_send_clear_spool in Views Send 7
Same name and namespace in other branches
- 8 views_send.cron.inc \views_send_clear_spool()
- 6 views_send.cron.inc \views_send_clear_spool()
Clear the expired items from spool.
1 call to views_send_clear_spool()
- views_send_cron in ./
views_send.module - Implements hook_cron().
File
- ./
views_send.cron.inc, line 70 - Views Send cron rotuines.
Code
function views_send_clear_spool() {
// TODO: Drupal 7: replace time() with REQUEST_TIME.
$expiration_time = time() - variable_get('views_send_spool_expire', 0) * 86400;
db_query("DELETE FROM {views_send_spool} WHERE status = :status AND timestamp <= :expiry", array(
':status' => 1,
'expiry' => $expiration_time,
));
}