function acquia_spi_boot in Acquia Connector 7.3
Same name and namespace in other branches
- 6.2 acquia_spi/acquia_spi.module \acquia_spi_boot()
- 7.2 acquia_spi/acquia_spi.module \acquia_spi_boot()
Implements hook_boot().
File
- acquia_spi/
acquia_spi.module, line 95 - Send site profile information (NSPI) and system data to Acquia Insight.
Code
function acquia_spi_boot() {
// Store server information for SPI incase data is being sent from PHP CLI.
if (drupal_is_cli()) {
return;
}
// Get the last time we processed data.
$last = variable_get('acquia_spi_boot_last', 0);
// 60 minute interval for storing the global variable.
$interval = variable_get('acquia_spi_cron_interval', 60);
// Determine if the required interval has passed.
$now = REQUEST_TIME;
if ($now - $last > $interval * 60) {
$platform = acquia_spi_get_platform();
acquia_spi_data_store_set(array(
'platform' => $platform,
));
variable_set('acquia_spi_boot_last', $now);
}
}