shrinerb / shrine

File Attachment toolkit for Ruby applications

Home Page:https://shrinerb.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

WARN: Job arguments to PromoteJob do not serialize to JSON safely. This will raise an error in Sidekiq 7.0.

QuentinRoadstr opened this issue · comments

Hi
According to the documentation, we could pass file_data as argument but as reported in the title, this will raise an error :
"Job arguments to PromoteJob do not serialize to JSON safely. This will raise an error in Sidekiq 7.0."

More information here :
https://github.com/sidekiq/sidekiq/wiki/Best-Practices

Could documentation suggest another way to make it ? I think transmitting the temporary path of the file_data could be a fix.

(I'm not a maintainer, just a peer)

Can you check and see what file_data actually is? I'm surprised it's not already json-able, and I wonder if it might be close.

I found an exemple value on Sidekiq :

{"id"=>"production/car_pictures/original/image/3e9817fa23f14ceaba41d65ff897feae.jpg", "storage"=>"cache"}

Note sure what exactly isn't serializable to JSON here, could you post all the arguments?