You are here

function boost_crawler_run in Boost 7

Same name and namespace in other branches
  1. 6 boost.module \boost_crawler_run()

Worker Callback for the boost_crawler cron queue.

1 string reference to 'boost_crawler_run'
boost_crawler_cron_queue_info in boost_crawler/boost_crawler.module
Implements hook_cron_queue_info().

File

boost_crawler/boost_crawler.module, line 63
Minimal crawler to regenerate the cache as pages are expired.

Code

function boost_crawler_run($url) {

  // Not doing async requests in order not to kill the server
  // and also for the 'time' limit of the queue to make sense.
  $options = array(
    'headers' => array(
      'Pragma' => 'no-cache',
    ),
  );
  httprl_request($url, $options);
  $request = httprl_send_request();
  boost_log('Crawler fetched !url', array(
    '!url' => $url,
  ), WATCHDOG_DEBUG);
}