function tracker_install
Implements hook_install().
File
- 
              core/
modules/ tracker/ tracker.install, line 18  
Code
function tracker_install() {
  $max_nid = \Drupal::database()->query('SELECT MAX([nid]) FROM {node}')
    ->fetchField();
  if ($max_nid != 0) {
    \Drupal::state()->set('tracker.index_nid', $max_nid);
    // To avoid timing out while attempting to do a complete indexing, we
    // simply call our cron job to remove stale records and begin the process.
    tracker_cron();
  }
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.