instance method serialize

Ruby on Rails 6.1.7.10

Since v4.2.9

Available in: v4.2.9 v5.2.8.1 v6.0.6 v6.1.7.10 v7.0.10 v7.1.6 v7.2.3 v8.0.4 v8.1.2

Signature

serialize()

Returns a hash with the job data that can safely be passed to the queuing adapter.

Source
# File activejob/lib/active_job/core.rb, line 94
    def serialize
      {
        "job_class"  => self.class.name,
        "job_id"     => job_id,
        "provider_job_id" => provider_job_id,
        "queue_name" => queue_name,
        "priority"   => priority,
        "arguments"  => serialize_arguments_if_needed(arguments),
        "executions" => executions,
        "exception_executions" => exception_executions,
        "locale"     => I18n.locale.to_s,
        "timezone"   => timezone,
        "enqueued_at" => Time.now.utc.iso8601
      }
    end

Defined in activejob/lib/active_job/core.rb line 94 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveJob::Core

Type at least 2 characters to search.

↑↓ navigate · open · esc close