background_process.drush.inc in Background Process 7.2
Drush sql commands
File
background_process.drush.incView source
<?php
/**
* @file Drush sql commands
*/
/**
* Implementation of hook_drush_help().
*/
function background_process_drush_help($section) {
switch ($section) {
case 'meta:background_process:title':
return dt('AutoSlave commands');
case 'meta:background_process:summary':
return dt('Examine and modify your Drupal database via AutoSlave.');
}
}
/**
* Implementation of hook_drush_command().
*/
function background_process_drush_command() {
$items['background-process-execute'] = array(
'description' => "Execute an initialized background process.",
'bootstrap' => DRUSH_BOOTSTRAP_DRUSH,
'aliases' => array(
'bgp-execute',
),
'arguments' => array(
'pid' => 'The process id of the background process to execute',
),
'examples' => array(
'drush bgp-execute 12' => "Runs the process with process id 12",
),
);
return $items;
}
function drush_background_process_execute($pid) {
$process = BackgroundProcess::load($pid);
if (!$process) {
return drush_set_error(dt('Unknown process: !pid', array(
'!pid' => $pid,
)));
}
$process
->execute();
}
Functions
Name | Description |
---|---|
background_process_drush_command | Implementation of hook_drush_command(). |
background_process_drush_help | Implementation of hook_drush_help(). |
drush_background_process_execute |