Rails
ActiveJob

ActiveJobの引数にはなんでも突っ込んでいいわけではない

More than 3 years have passed since last update.

ActiveJobの引数に独自クラスを突っ込むとエラーになった。

ActiveJob::SerializationError (Unsupported argument type: Foo::Bar):

serializationしてるから、下記以外のクラスを入れたらエラーになるらしい。

Raised when an unsupported argument type is being set as job argument. We currently support NilClass, Fixnum, Float, String, TrueClass, FalseClass, Bignum and object that can be represented as GlobalIDs (ex: Active Record). Also raised if you set the key for a Hash something else than a string or a symbol.

http://edgeapi.rubyonrails.org/classes/ActiveJob/SerializationError.html