You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
thanks for the nice PHP package. Since yesterday I'm using it in my Laravel app.
Everything is working fine. However I'm noticing that my app is around 300ms per request slower with Slack on. In New Relic I also see higher load times due to Slack.
It seems that it is waiting for the response of the Slack webhook before continuing the rest of the code. I'm using the following code:
Slack::send($message);
Is there a way that the Laravel app doesn't have to wait till the Slack send command has finished? For example, can I queue the message?
Cheers, Klemens
The text was updated successfully, but these errors were encountered:
Since PHP isn't async, the web request to Slack will block until a response is returned, so seeing a 300ms slow down per request is expected.
As you suggested, a queue is the way to go here. I have a whole queue job class for the different Slack messages we put out, but as a simplistic example:
Hi Maknz,
thanks for the nice PHP package. Since yesterday I'm using it in my Laravel app.
Everything is working fine. However I'm noticing that my app is around 300ms per request slower with Slack on. In New Relic I also see higher load times due to Slack.
It seems that it is waiting for the response of the Slack webhook before continuing the rest of the code. I'm using the following code:
Slack::send($message);
Is there a way that the Laravel app doesn't have to wait till the Slack send command has finished? For example, can I queue the message?
Cheers, Klemens
The text was updated successfully, but these errors were encountered: