-
-
Notifications
You must be signed in to change notification settings - Fork 10
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
Reserving a job from an empty queue throws an "Unknown Error" #14
Comments
Try an alpha version, this problem should be solved there. |
Hello! I've got the same error on alpha... |
@splastunov what is your use case? |
Failed with the same Socket error if Tube is empty. Even if you would try to watch empty Tube with watchTube it will fail. Allsow you have errors at documentation. |
Due to it is alpha it's not documented yet. |
Also seeing this issue, from what I can tell, the readline isn't waiting or is failing because its not returning anything straight away. It happens when you do a reserve-with-timeout |
OK I have worked out what the bug is $result = fgets($this->socket, 8192); If you are using reserve-with-timeout say set to 60, you need readline to wait for at least 60 seconds eg with something like |
@Punkley have you checked that? If that solves the issue ill dig into it in that direction |
Yep, it worksOn 28 Oct 2019 8:26 am, Anton Zinovyev <[email protected]> wrote:@Punkley have you checked that? If that solves the issue ill dig into it in that direction
—You are receiving this because you were mentioned.Reply to this email directly, view it on GitHub, or unsubscribe.
|
@Punkley check out the master branch. Pushed the fix, not tested yet, but it should help. |
so far, so good :) |
OK I think a slight tweak is needed, Every now and then about every 10th time I get I think I have however solved the issue by adding this eg the timeout needs to be just a little longer then the actual beanstalk timeout. |
after making that change, the script has been running for 12 hours+ Kingsley |
@Punkley 5 seconds is pretty much, have you tried smaller values? |
* Added read timeout for command that has it, possible fix of #14 * Added read timeout leeway.
@Punkley hello again. |
This is a bug report.
When reserving a job using
$client->reserve();
, an unknown error gets thrown when the queue is empty.According to the documentation (and the source code), an empty queue should not throw an error, but instead result in a Job with id=null.
Versions i'm using:
The text was updated successfully, but these errors were encountered: