Skip to content

Instantly share code, notes, and snippets.

@johnrobertwilson
Created September 15, 2011 03:39
Show Gist options
  • Select an option

  • Save johnrobertwilson/1218466 to your computer and use it in GitHub Desktop.

Select an option

Save johnrobertwilson/1218466 to your computer and use it in GitHub Desktop.
Bad Cron Hook
/**
* Implements hook_cron().
*/
function apachesolr_indexer_cron() {
$cron_limit = variable_get('apachesolr_cron_limit', 50);
$rows = apachesolr_indexer_get_entities_to_index('apachesolr_search', $cron_limit);
apachesolr_indexer_enqueue($rows);
variable_set('apachesolr_indexer_last_run', REQUEST_TIME);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment