Class: AcidicJob::Serializers::ActiveKiqSerializer
- Inherits:
-
ActiveJob::Serializers::ObjectSerializer
- Object
- ActiveJob::Serializers::ObjectSerializer
- AcidicJob::Serializers::ActiveKiqSerializer
- Defined in:
- lib/acidic_job/serializers/active_kiq_serializer.rb
Instance Method Summary collapse
Instance Method Details
#deserialize(hash) ⇒ Object
15 16 17 18 |
# File 'lib/acidic_job/serializers/active_kiq_serializer.rb', line 15 def deserialize(hash) worker_class = hash["job_class"].constantize worker_class.new(*hash["arguments"]) end |
#serialize(worker) ⇒ Object
8 9 10 11 12 13 |
# File 'lib/acidic_job/serializers/active_kiq_serializer.rb', line 8 def serialize(worker) super( "job_class" => worker.class.name, "arguments" => Arguments.serialize(worker.arguments), ) end |