Skip to content

Commit 05c627e

Browse files
committed
test laravel horizon
1 parent 09b8a53 commit 05c627e

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

agent/fw_laravel_queue.c

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

842+
NR_PHP_WRAPPER(nr_laravel_horizon_end) {
843+
NR_UNUSED_SPECIALFN;
844+
(void)wraprec;
845+
846+
nrl_verbosedebug(NRL_TXN, "Laravel Horizon Stop");
847+
848+
nr_php_txn_end(1, 0 TSRMLS_CC);
849+
850+
nrl_verbosedebug(NRL_TXN, "Laravel Horizon Stop");
851+
}
852+
NR_PHP_WRAPPER_END
853+
842854
void nr_laravel_queue_enable(TSRMLS_D) {
843855
/*
844856
* Hook the command class that implements Laravel's queue:work command so
@@ -892,6 +904,12 @@ void nr_laravel_queue_enable(TSRMLS_D) {
892904
nr_laravel_queue_workcommand_handle TSRMLS_CC);
893905
#endif
894906

907+
nr_php_wrap_user_function(NR_PSTR("Laravel\\Horizon\\Console\\HorizonCommand::handle"),
908+
nr_laravel_horizon_end TSRMLS_CC);
909+
910+
nr_php_wrap_user_function(NR_PSTR("Laravel\\Horizon\\Console\\SupervisorCommand::handle"),
911+
nr_laravel_horizon_end TSRMLS_CC);
912+
895913
/*
896914
* Hook the method that creates the JSON payloads for queued jobs so that we
897915
* can add our metadata for CATMQ.

0 commit comments

Comments
 (0)