maxbrokman / SafeQueue

Laravel Doctrine friendly queue worker
MIT License
30 stars 28 forks source link

Laravel 5.3 support #2

Closed Hodgy closed 8 years ago

Hodgy commented 8 years ago

Updated the library to support Laravel 5.3.

All the tests are passing and the codesniffer has been run.

I haven't been able to test it against my app yet as the 5.3 upgrade hasn't been simple. Ill try and get a basic app setup over the next few days to test it against. Unless you have one you can check it against?

This will break backwards compatibility.

coveralls commented 8 years ago

Coverage Status

Coverage remained the same at 87.097% when pulling 3130598603c8575057bd280b48bc1d41ea5c9d82 on Hodgy:5-3-support into 83f0fc9fe6e48767e33896b3362d415cf1172335 on maxbrokman:master.

maxbrokman commented 8 years ago

Thanks for this @Hodgy

We're not quite on 5.3 yet at my job but it's something I'll be doing next week and I can have a play with this then.

I think I'd want to split into a 5.2 support branch and a 5.3 branch. @driesvints also had a proposal (/working solution?) that might turn out better for avoiding breaking changes in Laravel.

Hop on the Laravel-Doctrine slack if you want to chat.

Hodgy commented 8 years ago

No worries, this library came to our rescue last week so figured I would try and give something back :D

Ahh, if there is a way to avoid the breaking changes makes sense to go that route.

Ill be on the slack as soon as the invite arrives in my email.

driesvints commented 8 years ago

So what I currently do is listening to the Illuminate\Queue\Events\JobProcessing event and reconnecting the DB connection if no connection is available. That way you're sure to have a DB connection when your queue job runs.

driesvints commented 8 years ago

Just a FYI: Max's library does a lot more than my solution so if you're experiencing memory problems and want better handling of exceptions in your queue jobs, definitely go for this library. We might switch to it as well at some point.

maxbrokman commented 8 years ago

Re-created this to 0.2-dev branch see #3