rubyonjets/jets

Jets jobs should serialize data identically in local environments.

Closed this issue · 1 comments

https://github.com/boltops-tools/jets/blob/f5851b6db969ae39b053ed1b2f5f722dc1e6425d/lib/jets/job/base.rb#L32-L41

I spent a while chasing a "works on my machine!" issue where I was accidentally passing an ActionController::Parameters object to a job. JSON.dump doesn't serialize them correctly -- it should use .to_unsafe_hash, but instead it .inspects them and saves the whole structure as a pretty-printed ruby data structure in a String.

The fact that I'm an idiot aside, the behavior should be as identical as possible between a local jets server and running on lambda.. My code never should've worked in the first place 😅.

Closed by #596