Class: CommandTower::Messaging::Handoff::OperationLogger

Inherits:
Object
  • Object
show all
Defined in:
app/services/command_tower/messaging/handoff/operation_logger.rb

Class Method Summary collapse

Class Method Details

.enqueue_failed(communication_id:, error:) ⇒ Object



30
31
32
33
34
35
36
37
38
# File 'app/services/command_tower/messaging/handoff/operation_logger.rb', line 30

def enqueue_failed(communication_id:, error:)
  emit(
    :error,
    "messaging.accept.handoff.failed",
    communication_id:,
    error_class: error.class.name,
    error_code: "handoff_enqueue_failed",
  )
end

.failed(communication:, error:) ⇒ Object



20
21
22
23
24
25
26
27
28
# File 'app/services/command_tower/messaging/handoff/operation_logger.rb', line 20

def failed(communication:, error:)
  emit(
    :error,
    "messaging.accept.handoff.failed",
    communication:,
    error_class: error.class.name,
    error_code: "handoff_execution_failed",
  )
end

.recovered(communication:) ⇒ Object



40
41
42
# File 'app/services/command_tower/messaging/handoff/operation_logger.rb', line 40

def recovered(communication:)
  info("messaging.accept.handoff.recovered", communication:)
end

.scheduled(communication:) ⇒ Object



8
9
10
# File 'app/services/command_tower/messaging/handoff/operation_logger.rb', line 8

def scheduled(communication:)
  info("messaging.accept.handoff.scheduled", communication:)
end

.started(communication:) ⇒ Object



12
13
14
# File 'app/services/command_tower/messaging/handoff/operation_logger.rb', line 12

def started(communication:)
  info("messaging.accept.handoff.started", communication:)
end

.succeeded(communication:) ⇒ Object



16
17
18
# File 'app/services/command_tower/messaging/handoff/operation_logger.rb', line 16

def succeeded(communication:)
  info("messaging.accept.handoff.succeeded", communication:)
end