Skip to content

Commit c777c6f

Browse files
committed
chore(agent): add comment
1 parent e98209e commit c777c6f

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

agent/fw_laravel_queue.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -839,6 +839,11 @@ NR_PHP_WRAPPER(nr_laravel_queue_queue_createpayload) {
839839
}
840840
NR_PHP_WRAPPER_END
841841

842+
/*
843+
* Ensure that the transaction is properly stopped when Laravel Horizon is being
844+
* used by wrapping the handle method of the HorizonCommand and
845+
* SupervisorCommand class.
846+
*/
842847
NR_PHP_WRAPPER(nr_laravel_horizon_end) {
843848
NR_UNUSED_SPECIALFN;
844849
(void)wraprec;
@@ -881,6 +886,13 @@ void nr_laravel_queue_enable(TSRMLS_D) {
881886
nr_php_wrap_user_function_before_after_clean(
882887
NR_PSTR("Illuminate\\Queue\\SyncQueue::raiseAfterJobEvent"),
883888
nr_laravel_queue_worker_raiseAfterJobEvent_before, NULL, NULL);
889+
890+
/*
891+
* The following functions have been added to ensure that the transaction
892+
* is properly stopped when Laravel Horizon is being used. This is
893+
* accomplished by wrapping the handle method of the HorizonCommand class and
894+
* the SupervisorCommand class.
895+
*/
884896
nr_php_wrap_user_function_before_after_clean(
885897
NR_PSTR("Laravel\\Horizon\\Console\\HorizonCommand::handle"),
886898
nr_laravel_horizon_end, NULL, NULL);

0 commit comments

Comments
 (0)