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? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -