Open StanAngeloff opened 9 years ago
There are a couple of PRs intended to catch issues with adding jobs to the queue and indicate failures to the developer. Any of these has already handled the issue you mention, in the way you describe. When Chris has the time to properly evaluate them, one will be merged and this issue will be resolved.
For the record, queueing works as expected, however the value pushed in Redis is an empty string. I didn't spot a pull that accounted for this case -- did you have one in mind I can add to my watch list?
I ran across this recently and thought I should document it. The
Resque::push
method usesjson_encode
and doesn't check its return value. This allowsfalse
or an empty string to berpush
ed into Redis and the developer is none the wiser.One such instance where
json_encode
will fail is if the arguments for a job contain a string which is not properly UTF-8 encoded.My personal preference is to throw an exception and let the calling code deal with it.