You are here

function drush_xmlsitemap_regenerate in XML sitemap 7.2

Same name and namespace in other branches
  1. 8 xmlsitemap.drush.inc \drush_xmlsitemap_regenerate()
  2. 6.2 xmlsitemap.drush.inc \drush_xmlsitemap_regenerate()

Regenerate the sitemap files from existing data.

1 string reference to 'drush_xmlsitemap_regenerate'
xmlsitemap_drush_command in ./xmlsitemap.drush.inc
Implements hook_drush_command().

File

./xmlsitemap.drush.inc, line 54
Drush integration functions for the xmlsitemap module.

Code

function drush_xmlsitemap_regenerate() {
  module_load_include('generate.inc', 'xmlsitemap');

  // Run the batch process.
  timer_start('xmlsitemap_regenerate');
  xmlsitemap_run_unprogressive_batch('xmlsitemap_regenerate_batch');
  $vars = array(
    '@timer' => timer_read('xmlsitemap_regenerate'),
    '@memory-peak' => format_size(memory_get_peak_usage(TRUE)),
  );
  drush_print(dt('XML sitemap files regenerated in @timer ms. Peak memory usage: @memory-peak.', $vars));
}