sidekiq - MultiJson::LoadError (795: unexpected token -


i getting kind of weird behaviour. using sidekiq background processing. whenever perform_async on sidekiqjob post data rails app, multijson::loaderror, when create instance of , call perform on works charm. don't know exact culprit.

sidekiqjob.perform_async(:id => blog.id) (having multijson::load error)

sidekiqjob.new.perform(:id => blog.id) (everything works fine)

sidekiqjob perform method looks this:

def perform(params)   body = {'status' => 'completed', 'results' => result.find(params['id']).build_results}    httparty.post(some_callback_url, :body => body.to_json, :headers => {'content-type' => 'application/json'}) end 

need direction resolve issue.

adding charset utf-8 in request header resolve issue


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

keyboard - C++ GetAsyncKeyState alternative -

android - java.net.UnknownHostException(Unable to resolve host “URL”: No address associated with hostname) -