You are here

function hosting_task_gc_hosting_queues in Hosting 7.3

Same name and namespace in other branches
  1. 7.4 task_gc/hosting_task_gc.module \hosting_task_gc_hosting_queues()

Implements hook_hosting_queues().

Return a list of queues that this module needs to manage.

File

task_gc/hosting_task_gc.module, line 13
Module code for Hosting task garbage collection

Code

function hosting_task_gc_hosting_queues() {
  $count = hosting_task_gc_count_sites();
  $queue['task_gc'] = array(
    'name' => t('Task GC'),
    'description' => t('Process the garbage collection of task logs.'),
    // Run queue sequentially. always with the same parameters.
    'type' => HOSTING_QUEUE_TYPE_BATCH,
    'frequency' => strtotime("1 hour", 0),
    'items' => 20,
    'total_items' => $count,
    'min_threads' => 6,
    'max_threads' => 12,
    'threshold' => 100,
    'singular' => t('site'),
    'plural' => t('sites'),
  );
  return $queue;
}