You are here

function xmlsitemap_run_unprogressive_batch in XML sitemap 7.2

Same name and namespace in other branches
  1. 8 xmlsitemap.module \xmlsitemap_run_unprogressive_batch()
  2. 6.2 xmlsitemap.module \xmlsitemap_run_unprogressive_batch()
  3. 2.x xmlsitemap.module \xmlsitemap_run_unprogressive_batch()

Run a not-progressive batch operation.

3 calls to xmlsitemap_run_unprogressive_batch()
drush_xmlsitemap_rebuild in ./
Dump and rebuild all the sitemap data, then regenerate the files.
drush_xmlsitemap_regenerate in ./
Regenerate the sitemap files from existing data.
xmlsitemap_cron in ./xmlsitemap.module
Implements hook_cron().


./xmlsitemap.module, line 1637
xmlsitemap XML sitemap


function xmlsitemap_run_unprogressive_batch() {
  $batch = batch_get();
  if (!empty($batch)) {

    // If there is already something in the batch, don't run.
    return FALSE;
  $args = func_get_args();
  $batch_callback = array_shift($args);
  if (!lock_acquire($batch_callback)) {
    return FALSE;

  // Attempt to increase the execution time.

  // Build the batch array.
  $batch = call_user_func_array($batch_callback, $args);

  // We need to manually set the progressive variable again.
  // @todo Remove when is fixed.
  $batch =& batch_get();
  $batch['progressive'] = FALSE;

  // Run the batch process.
  return TRUE;