I have a strange issue with sidekiq-monitor gem. The one from social-pandas. It works fine until i go on a certain page in my rails application. Then suddenly stops working and instead of returning data in this format:
{ sEcho: params[:sEcho].to_i,
iTotalRecords: @model_name.count,
iTotalDisplayRecords: filtered_record_count,
aaData: data
}
format defined into railsDatatables gem, it returns something like that:
"#<Sidekiq::Monitor::JobsDatatable:0x0000000e5a0b28>"
I don't have to do anything(run some sidekiq jobs) when i go on that page. Simple accessing it. After days of rsearch, and playing with sidekiq-monitor/railsdatatable gems, i came to the conclusion that it fails because after accessing that page, it no longer want to use as_json method defined into railsdatatable gem. In the index method of the job controller there is that code:
render json: JobsDatatable.new(view_context)
I can't imagine why this is happening. The only solution i found, but it produce another errors(for example makes jquery timeago reffer the 0 UTC time, and all jobs i run, instead of showing, started a few seconds ago, is three hours ago) is to modify the code so:
render json: JobsDatatable.new(view_context).as_json
Does anyone have an idea?
Aucun commentaire:
Enregistrer un commentaire