How to reproduce/sanitize messy POST params to avoid YAML serialization issues with delayed_job?

后端 未结 2 2013
挽巷
挽巷 2021-01-22 08:34

Today, every time I was starting delayed_job workers, the process would die immediately and silently.

After some investigation (and finding out about the fo

2条回答
  •  梦谈多话
    2021-01-22 08:54

    Any idea how I should sanitize my params to avoid such a problem?

    Do not serialize your activerecord objects, instead just serialize the AR id, then do a find as the first step in the job.

    Not sure why your serialized AR is corrupted, did your schema change between the time the serialization occured and before the job ran?

提交回复
热议问题