segmentio / analytics-php

The hassle-free way to integrate analytics into any php application.
https://segment.com/libraries/php
MIT License
253 stars 128 forks source link

Segment tracking doesn't work with Laravel Queues #203

Closed baj84 closed 2 years ago

baj84 commented 2 years ago

This has been an issued noted by a few people.

See this thread: https://laracasts.com/index.php/index.php/discuss/channels/laravel/queuework-not-working-but-queuelisten-did?page=1&replyId=573027

In the segment documentation it says: "Because PHP is a single threaded and shared-nothing environment, we can’t use a queue in a separate thread or a connection pool to flush messages"

Maybe this has something to do with it?

My work around was to remove all tracking out of queues - would be great to have a real fix for this though.

nd4p90x commented 2 years ago

@baj84 I agree, the only solution is to not use the queues with laravel. If any other solutions present themselves, please share here as I will do the same. Thank you.

nd4p90x commented 2 years ago

Feel free to re-open this issue if the need arises. Thank you