You are here

function acquia_agent_watchdog in Acquia Connector 7

Same name and namespace in other branches
  1. 6.2 acquia_agent/acquia_agent.module \acquia_agent_watchdog()
  2. 6 acquia_agent/acquia_agent.module \acquia_agent_watchdog()
  3. 7.3 acquia_agent/acquia_agent.module \acquia_agent_watchdog()
  4. 7.2 acquia_agent/acquia_agent.module \acquia_agent_watchdog()

Implementation of hook_watchdog().

File

acquia_agent/acquia_agent.module, line 304
Acquia Agent securely sends information to Acquia Network.

Code

function acquia_agent_watchdog($log_entry) {

  // Make sure that even when cron failures prevent hook_cron() from being
  // called, we still send out a heartbeat.
  $cron_failure_messages = array(
    'Cron has been running for more than an hour and is most likely stuck.',
    'Attempting to re-run cron while it is already running.',
  );
  if (in_array($log_entry['message'], $cron_failure_messages, TRUE)) {
    acquia_agent_check_subscription();
  }
}