You are here

function acquia_spi_send_full_spi in Acquia Connector 6.2

Same name and namespace in other branches
  1. 7.3 acquia_spi/acquia_spi.module \acquia_spi_send_full_spi()
  2. 7.2 acquia_spi/acquia_spi.module \acquia_spi_send_full_spi()

Gather full SPI data and send to Acquia Insight.

Parameters

string $method Optional identifier for the method initiating request.: Values could be 'cron' or 'menu callback' or 'drush'.

Return value

mixed FALSE if data not sent else NSPI result array

3 calls to acquia_spi_send_full_spi()
acquia_spi_agent_settings_submit in acquia_spi/acquia_spi.module
Added submit function for acquia_agent_settings form.
acquia_spi_cron in acquia_spi/acquia_spi.module
Implementation of hook_cron().
_acquia_spi_send in acquia_spi/acquia_spi.module
Callback for sending SPI data.

File

acquia_spi/acquia_spi.module, line 343
Send site profile information (NSPI) and system data to Acquia Insight.

Code

function acquia_spi_send_full_spi($method = '') {
  $spi = acquia_spi_get();
  if (!empty($method)) {
    $spi['send_method'] = $method;
  }
  $result = acquia_spi_send_data($spi);
  if ($result === FALSE) {
    return FALSE;
  }
  acquia_spi_handle_server_response($result);
  variable_set('acquia_spi_cron_last', time());
  return $result;
}