Class: LogStruct::Log::ActiveJob::Schedule
- Inherits:
-
T::Struct
- Object
- T::Struct
- LogStruct::Log::ActiveJob::Schedule
- Extended by:
- T::Sig
- Includes:
- Interfaces::CommonFields, Shared::SerializeCommon
- Defined in:
- lib/log_struct/log/active_job/schedule.rb
Instance Method Summary collapse
Methods included from Shared::SerializeCommon
#as_json, #serialize, #serialize_common
Methods included from Interfaces::CommonFields
Methods included from Interfaces::CommonFieldBase
#level, #serialize, #timestamp
Instance Method Details
#to_h ⇒ Object
47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/log_struct/log/active_job/schedule.rb', line 47 def to_h h = T.let({}, T::Hash[LogStruct::LogField, T.untyped]) h[LogField::JobId] = job_id h[LogField::JobClass] = job_class h[LogField::QueueName] = queue_name unless queue_name.nil? h[LogField::Arguments] = arguments unless arguments.nil? h[LogField::Executions] = executions unless executions.nil? h[LogField::ProviderJobId] = provider_job_id unless provider_job_id.nil? h[LogField::ScheduledAt] = scheduled_at h end |