Class: LogStruct::Log::ActiveJob::BaseFields

Inherits:
T::Struct
  • Object
show all
Extended by:
T::Sig
Defined in:
lib/log_struct/log/active_job.rb

Constant Summary collapse

Kwargs =
T.type_alias do
  {
    job_id: String,
    job_class: String,
    queue_name: T.nilable(Symbol),
    arguments: T.nilable(T::Array[T.untyped]),
    executions: T.nilable(Integer),
    provider_job_id: T.nilable(String)
  }
end

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(job_id:, job_class:, queue_name: nil, arguments: nil, executions: nil, provider_job_id: nil) ⇒ void

Parameters:

  • job_id (String)
  • job_class (String)
  • queue_name (Symbol, nil) (defaults to: nil)
  • arguments (Array<T.untyped>, nil) (defaults to: nil)
  • executions (Integer, nil) (defaults to: nil)
  • provider_job_id (String, nil) (defaults to: nil)


# File ''

const :job_id, String
const :job_class, String
const :queue_name, T.nilable(Symbol), default: nil
const :arguments, T.nilable(T::Array[T.untyped]), default: nil
const :executions, T.nilable(Integer), default: nil
const :provider_job_id, T.nilable(String), default: nil

Instance Attribute Details

#argumentsArray<T.untyped>? (readonly)

Returns the value of prop arguments.

Returns:

  • (Array<T.untyped>, nil)


# File ''

const :arguments, T.nilable(T::Array[T.untyped]), default: nil

#executionsInteger? (readonly)

Returns the value of prop executions.

Returns:

  • (Integer, nil)


# File ''

const :executions, T.nilable(Integer), default: nil

#job_classString (readonly)

Returns the value of prop job_class.

Returns:

  • (String)


# File ''

const :job_class, String

#job_idString (readonly)

Returns the value of prop job_id.

Returns:

  • (String)


# File ''

const :job_id, String

#provider_job_idString? (readonly)

Returns the value of prop provider_job_id.

Returns:

  • (String, nil)


# File ''

const :provider_job_id, T.nilable(String), default: nil

#queue_nameSymbol? (readonly)

Returns the value of prop queue_name.

Returns:

  • (Symbol, nil)


# File ''

const :queue_name, T.nilable(Symbol), default: nil

Instance Method Details

#to_kwargsKwargs

Returns:



38
39
40
41
42
43
44
45
46
47
# File 'lib/log_struct/log/active_job.rb', line 38

def to_kwargs
  {
    job_id: job_id,
    job_class: job_class,
    queue_name: queue_name,
    arguments: arguments,
    executions: executions,
    provider_job_id: provider_job_id
  }
end