Пример #1
0
 public function testBackgroundJob()
 {
     $flag = true;
     $result = true;
     $handler = $this->getHandlerSpy('newrelic_background_job', array($flag), $result);
     $agent = new Newrelic(false, $handler);
     $this->assertSame($result, $agent->backgroundJob($flag));
 }
Пример #2
0
 /**
  * If no argument or true as an argument is given, mark the current transaction as a background job. If false is
  * passed as an argument, mark the transaction as a web transaction.
  *
  * @param bool $flag
  * @return mixed 
  * @static 
  */
 public static function backgroundJob($flag = true)
 {
     return \Intouch\Newrelic\Newrelic::backgroundJob($flag);
 }