Skip to content

Commit 04ec6b9

Browse files
committed
fix: remove unnecessary wraps
1 parent 1269a02 commit 04ec6b9

File tree

1 file changed

+1
-31
lines changed

1 file changed

+1
-31
lines changed

agent/fw_laravel_queue.c

Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -391,21 +391,6 @@ NR_PHP_WRAPPER(nr_laravel_queue_worker_after) {
391391
}
392392
NR_PHP_WRAPPER_END
393393

394-
NR_PHP_WRAPPER(nr_laravel_queue_worker_stop_after) {
395-
NR_UNUSED_SPECIALFN;
396-
(void)wraprec;
397-
NR_PHP_WRAPPER_REQUIRE_FRAMEWORK(NR_FW_LARAVEL);
398-
/*
399-
* Anytime the worker is considering whether to stop or not (or actually stopping),
400-
* we can ignore everything that's happened previously (sleeping etc) that is non job processing related and avoid a useless txn.
401-
*/
402-
403-
404-
nr_php_txn_end(0, 0 TSRMLS_CC);
405-
nr_php_txn_begin(NULL, NULL TSRMLS_CC);
406-
}
407-
NR_PHP_WRAPPER_END
408-
409394
#else
410395
/*
411396
* Purpose : Extract the actual job name from a job that used CallQueuedHandler
@@ -659,8 +644,6 @@ NR_PHP_WRAPPER(nr_laravel_queue_worker_process) {
659644
nr_free(txn_name);
660645
}
661646

662-
NR_PHP_WRAPPER_CALL;
663-
664647
/*
665648
* We need to report any uncaught exceptions now, so that they're on the
666649
* transaction we're about to end. We can see if there's an exception waiting
@@ -705,6 +688,7 @@ NR_PHP_WRAPPER(nr_laravel_queue_worker_process) {
705688
*/
706689
nr_php_txn_end(1, 0 TSRMLS_CC);
707690
nr_php_txn_begin(NULL, NULL TSRMLS_CC);
691+
NR_PHP_WRAPPER_CALL;
708692
}
709693
NR_PHP_WRAPPER_END
710694

@@ -969,20 +953,6 @@ void nr_laravel_queue_enable(TSRMLS_D) {
969953
NR_PSTR("Illuminate\\Queue\\SyncQueue::raiseBeforeJobEvent"),
970954
nr_laravel_queue_worker_raiseBeforeJobEvent_before, NULL, NULL);
971955

972-
/*
973-
* Additional cleanup so we don't help prevent a useless excess txn after the worker ends.
974-
* Anytime the worker is questioning whether it should stop or is going to stop, we can end the txn.
975-
*/
976-
nr_php_wrap_user_function_before_after_clean(
977-
NR_PSTR("Illuminate\\Queue\\Worker::stopIfNecessary"),
978-
NULL, nr_laravel_queue_worker_stop_after, NULL);
979-
nr_php_wrap_user_function_before_after_clean(
980-
NR_PSTR("Illuminate\\Queue\\Worker::stopWorkerIfLostConnection"),
981-
NULL, nr_laravel_queue_worker_stop_after, NULL);
982-
nr_php_wrap_user_function_before_after_clean(
983-
NR_PSTR("Illuminate\\Queue\\Worker::stop"),
984-
NULL, nr_laravel_queue_worker_stop_after, NULL);
985-
986956
#else
987957

988958
/*

0 commit comments

Comments
 (0)