You are here

function new_relic_rpm_cron in New Relic 8

Same name and namespace in other branches
  1. 7 new_relic_rpm.module \new_relic_rpm_cron()
  2. 2.x new_relic_rpm.module \new_relic_rpm_cron()
  3. 2.0.x new_relic_rpm.module \new_relic_rpm_cron()

Implements hook_cron().

This is used to set cron tasks to be not tracked by New Relic if so desired.

File

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

Code

function new_relic_rpm_cron() {
  $cron_tracking = \Drupal::config('new_relic_rpm.settings')
    ->get('track_cron');
  \Drupal::service('new_relic_rpm.adapter')
    ->setTransactionState($cron_tracking);
}