You are here

function new_relic_rpm_set_job_state in New Relic 7

Tells New Relic if a job should be ignored or counted as a background job.

Parameters

$setting:

4 calls to new_relic_rpm_set_job_state()
new_relic_rpm_boot in ./new_relic_rpm.module
Implements hook_boot().
new_relic_rpm_cron in ./new_relic_rpm.module
Implements hook_cron().
new_relic_rpm_drush_init in ./new_relic_rpm.drush.inc
Implements hook_drush_init().
new_relic_rpm_init in ./new_relic_rpm.module
Implements hook_init().

File

./new_relic_rpm.module, line 314
Drupal module implementing New Relic.

Code

function new_relic_rpm_set_job_state($setting) {
  if (!new_relic_rpm_extension_installed()) {
    return;
  }
  switch ($setting) {
    case 'bg':
      newrelic_background_job(TRUE);
      break;
    case 'ignore':
      newrelic_ignore_transaction();
      break;
  }
}