1 batch.inc _batch_shutdown()

Shutdown function: Stores the current batch data for the next request.

See also

_batch_page()

backdrop_register_shutdown_function()

File

core/includes/batch.inc, line 501
Batch processing API for processes to run in multiple HTTP requests.

Code

function _batch_shutdown() {
  if ($batch = batch_get()) {
    db_update('batch')
      ->fields(array('batch' => serialize($batch)))
      ->condition('bid', $batch['id'])
      ->execute();
  }
}