You are here

hosting.drush.inc in Hosting 5

Same filename and directory in other branches
  1. 6.2 hosting.drush.inc
  2. 7.4 hosting.drush.inc
  3. 7.3 hosting.drush.inc

File

hosting.drush.inc
View source
<?php

function hosting_drush_command() {
  $items['hosting dispatch'] = array(
    'callback' => 'hosting_dispatch',
    'description' => dt('Centralized command for dispatching the various queue processors (hosting, cron, backup etc.)'),
  );
  $items['hosting setup'] = array(
    'callback' => 'hosting_setup',
    'description' => dt('Set up initial configuration settings such as the cron entry for the queue dispatcher and more.'),
  );
  $queues = hosting_get_queues();
  foreach ($queues as $queue => $info) {
    $dispatch = dt("Dispatched: @items items every @frequency minutes", array(
      '@items' => $info['items'],
      '@frequency' => round($info['frequency'] / 60),
    ));
    $items['hosting ' . $queue] = array(
      'callback' => 'hosting_run_queue',
      'description' => $info['description'] . " " . $dispatch,
      'queue' => $queue,
    );
  }
  $items['hosting task'] = array(
    'description' => 'execute a specific queue item',
    'bootstrap' => DRUSH_BOOTSTRAP_DRUPAL_FULL,
  );
  return $items;
}

Functions