/**
 * Implements hook_cron().
 *
 * Deletes queue items belonging to VBO active queues (used by VBO's batches)
 * that are older than a day (since they can only be a result of VBO crashing
 * or the execution being interrupted in some other way). This is the interval
 * used to cleanup batches in system_cron(), so it can't be increased.
 *
 * Note: This code is specific to SystemQueue. Other queue implementations will
 * need to do their own garbage collection.
 */
function views_bulk_operations_cron() {
  db_delete('queue')
    ->condition('name', db_like('views_bulk_operations_active_queue_'), 'LIKE')
    ->condition('created', REQUEST_TIME - 864000, '<')
    ->execute();
}
Deletes items ... older than a day

864000 seconds is ten days.

Comments

bojanz’s picture

We have an extra zero in there :) Should be 86400

bojanz’s picture

Status: Active » Fixed

Committed a fix.

  • bojanz committed 44e8e5e on 7.x-3.x
    Issue #2341283 by JvE: Fixed views_bulk_operations_cron says 1 day but...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.