function drush_backend_batch_process

8.0.x batch.inc drush_backend_batch_process($command = 'batch-process', $args = array(), $options = array())
6.x batch.inc drush_backend_batch_process($command = 'batch-process', $args = array(), $options = array())
7.x batch.inc drush_backend_batch_process($command = 'batch-process', $args = array(), $options = array())
3.x batch.inc drush_backend_batch_process($command = 'batch-process')
4.x batch.inc drush_backend_batch_process($command = 'batch-process')
5.x batch.inc drush_backend_batch_process($command = 'batch-process', $args = array(), $options = array())
master batch.inc drush_backend_batch_process($command = 'batch-process', $args = array(), $options = array())

Process a Drupal batch by spawning multiple Drush processes.

This function will include the correct batch engine for the current major version of Drupal, and will make use of the drush_backend_invoke system to spawn multiple worker threads to handle the processing of the current batch, while keeping track of available memory.

The batch system will process as many batch sets as possible until the entire batch has been completed or half of the available memory has been used.

This function is a drop in replacement for the existing batch_process() function of Drupal.

Parameters

command: The command to call for the back end process. By default this will be the 'backend-process' command, but some commands such as updatedb will have special initialization requirements, and will need to define and use their own command.

2 calls to drush_backend_batch_process()
drush_update_batch in commands/core/drupal/update_7.inc
Start the database update batch process.
update_main in commands/core/drupal/update_6.inc

File

includes/batch.inc, line 51
Drush batch API.

Code

function drush_backend_batch_process($command = 'batch-process') {
  drush_include_engine('drupal', 'batch', drush_drupal_major_version());
  _drush_backend_batch_process($command);
}