In the last episode we built a simple Sidekiq worker. We used a case statement
to switch on the argument passed in, like this:
puts "Really took quite a bit of effort"
puts "That was a bit of work"
puts "That wasn't a lot of effort"
This case statement is the sort of thing I would typically use a symbol for. So
why didn't we? Sidekiq uses the JSON data format to store all job data in Redis
and JSON doesn't support symbols and other Ruby-specific data types.
You're welcome to try it yourself to get a feel for it,
but symbols are converted to Strings when the client API pushes the job to Redis.
The bottom line? Use simple job parameters and avoid serializing complex
objects to Redis in your workers. You'll end up much happier!