Skip to content

Commit ed39176

Browse files
committed
chore(agent): change function location to inside of conditional
1 parent de6f6cf commit ed39176

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

agent/fw_laravel_queue.c

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -844,6 +844,8 @@ NR_PHP_WRAPPER(nr_laravel_horizon_end) {
844844
(void)wraprec;
845845

846846
nr_php_txn_end(1, 0 TSRMLS_CC);
847+
848+
nrl_verbosedebug(NRL_TXN, "Ending Laravel Horizon Transaction");
847849
}
848850
NR_PHP_WRAPPER_END
849851

@@ -879,6 +881,12 @@ void nr_laravel_queue_enable(TSRMLS_D) {
879881
nr_php_wrap_user_function_before_after_clean(
880882
NR_PSTR("Illuminate\\Queue\\SyncQueue::raiseAfterJobEvent"),
881883
nr_laravel_queue_worker_raiseAfterJobEvent_before, NULL, NULL);
884+
nr_php_wrap_user_function_before_after_clean(
885+
NR_PSTR("Laravel\\Horizon\\Console\\HorizonCommand::handle"),
886+
nr_laravel_horizon_end, NULL, NULL);
887+
nr_php_wrap_user_function_before_after_clean(
888+
NR_PSTR("Laravel\\Horizon\\Console\\SupervisorCommand::handle"),
889+
nr_laravel_horizon_end, NULL, NULL);
882890

883891
#else
884892

@@ -900,13 +908,6 @@ void nr_laravel_queue_enable(TSRMLS_D) {
900908
nr_laravel_queue_workcommand_handle TSRMLS_CC);
901909
#endif
902910

903-
nr_php_wrap_user_function_before_after_clean(
904-
NR_PSTR("Laravel\\Horizon\\Console\\HorizonCommand::handle"),
905-
nr_laravel_horizon_end, NULL, NULL);
906-
907-
nr_php_wrap_user_function_before_after_clean(
908-
NR_PSTR("Laravel\\Horizon\\Console\\SupervisorCommand::handle"),
909-
nr_laravel_horizon_end, NULL, NULL);
910911
/*
911912
* Hook the method that creates the JSON payloads for queued jobs so that we
912913
* can add our metadata for CATMQ.

0 commit comments

Comments
 (0)