-
Notifications
You must be signed in to change notification settings - Fork 76
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
Qless rack middleware: CommandError: bad argument to 'decode' #176
Comments
I switched back to 0.9.3 and found a similar error. In v0.9.3, the error appears to be caused by a nil
where line 33 corresponds to
adding "or '[]'" seems to fix this for me:
|
I'm working on some explanation for the above errors. As far as I can tell, the 'history' key of each job is not populated until some future point in the Qless worker process. So when a job is first placed on the queue, like the following one, it has no 'history' key:
It appears that a 'history' key is assumed, however, because code such as https://github.com/seomoz/qless-core/blob/534fac347c245a9a62100586e8ed662039ec6584/pop.lua#L208 (and line 215) will fail when history is nil and the "or '{}'" fallback is triggered (note: if history is an empty lua table, then history[#history] is nil, and history[#history]['worker'] and history[#history]['put'] are invalid and will trigger an error). |
I was experiencing the same thing and finally figured out what was going on (not sure if this will apply to you): The project I'm using qless with is making use of an earlier revision, but I had the latest gem installed system wide. These two conflicted, and so I had to remove the latest gems from my system gems and install the old revision. |
Yeah, that applies. I'll test to see if I can reproduce with only one version available system wide. |
Was there any outcome to this? I am getting the error: |
I am trying to read the job with client.jobs['e6d8ad4447e1468db4464529687fa127'] The job is complete. |
It seems that i can make the issue go away by adding the following: |
I have to move to 0.10.1 pre to resolve the issue. Any ideas what what may have been causing this? |
Having this problem as well. |
When I try to visit the home page of the Qless rack middleware, I get the exception below, indicating that a string is expected but it was passed a boolean. All other pages (queues, workers) except 'track' appear to work properly. The 'track' page has the same error.
Running on master HEAD.
The text was updated successfully, but these errors were encountered: