New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Queue: Add missing code to make it work outside of laravel #4401
Conversation
Are you using the Iron queue? I think that's the only one that uses the encrypter (though I'm not sure). If so, that should be added to the readme. |
I haven't tested it but wouldn't SQS and any other external queue services need Request aswell? Figured they'd also encrypt their tasks. |
I don't think the SQS driver uses encrypter. Read the code yourself. |
Why was this closed without a merge? It's clearly required for iron queues outside of laravel. You just get an error if you don't add it in... |
This issue also occurs when you want to use a Beanstalk queue. I got around it by using:
Which is described here: |
Yea, it was pretty ridiculous that Taylor closed this without merging. Probably saw Joseph's entirely unhelpful and irrelevant messages and assumed nothing needed to be done. |
Do I need to revisit?
|
That would be great. If you attempt to use certain drivers with Illuminate/Queue outside of laravel you just get an error message with nothing in the readme on how to fix it. The lines in my PR are required for Iron queues to work. I've only tested Iron.io but I guess they'd be required for any queue service not on localhost to work. |
https://github.com/laravel/framework/blob/4.2/src/Illuminate/Queue/QueueServiceProvider.php#L241 only Iron.io requires it. But wait, https://github.com/laravel/framework/blob/4.2/src/Illuminate/Queue/QueueManager.php#L95 sneak in the "encryptor" on all queue connection. |
In any case, if a line is required for it to work it should be in the readme. Hence the PR |
I think Request is just used by Iron for marshalling push queue request. So we can probably indicate that caveat in the readme. |
@taylorotwell it would be good to include this in the documentation. I'm running into problems with the encrypter not being present (easily solved), but it seems to be an issue if you're just using Capsule queue and an encrypter doesn't exist already. I would however use a bindIf(). Do I need to do another PR with a bit more detail? |
The current readme presents the following error when using an iron queue with Illuminate/queue outside of Laravel
The attached commit fixes this.