Class: DurableFlow::WorkflowLog

Inherits:
ApplicationRecord show all
Includes:
Live::Broadcastable
Defined in:
lib/durable_flow/models/workflow_log.rb

Constant Summary collapse

LEVELS =
WorkflowLogger::LEVELS

Instance Method Summary collapse

Instance Method Details

#data_valueObject



19
20
21
# File 'lib/durable_flow/models/workflow_log.rb', line 19

def data_value
  Serializer.load(data)
end

#live_snapshotObject



23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/durable_flow/models/workflow_log.rb', line 23

def live_snapshot
  {
    id: id,
    workflow_run_id: workflow_run_id,
    workflow_step_id: workflow_step_id,
    level: level,
    message: message,
    data: data,
    created_at: created_at,
    updated_at: updated_at,
  }
end