Class: RailwayIpc::ProcessIncomingMessage::UnknownMessageJob
- Inherits:
-
Object
- Object
- RailwayIpc::ProcessIncomingMessage::UnknownMessageJob
- Defined in:
- lib/railway_ipc/consumer/process_incoming_message.rb
Instance Attribute Summary collapse
-
#incoming_message ⇒ Object
readonly
Returns the value of attribute incoming_message.
-
#logger ⇒ Object
readonly
Returns the value of attribute logger.
Instance Method Summary collapse
-
#initialize(incoming_message, logger) ⇒ UnknownMessageJob
constructor
A new instance of UnknownMessageJob.
- #run ⇒ Object
- #status ⇒ Object
Constructor Details
#initialize(incoming_message, logger) ⇒ UnknownMessageJob
Returns a new instance of UnknownMessageJob.
8 9 10 11 |
# File 'lib/railway_ipc/consumer/process_incoming_message.rb', line 8 def initialize(, logger) @incoming_message = @logger = logger end |
Instance Attribute Details
#incoming_message ⇒ Object (readonly)
Returns the value of attribute incoming_message.
6 7 8 |
# File 'lib/railway_ipc/consumer/process_incoming_message.rb', line 6 def @incoming_message end |
#logger ⇒ Object (readonly)
Returns the value of attribute logger.
6 7 8 |
# File 'lib/railway_ipc/consumer/process_incoming_message.rb', line 6 def logger @logger end |
Instance Method Details
#run ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/railway_ipc/consumer/process_incoming_message.rb', line 17 def run logger.warn( "Ignoring unknown message of type '#{.type}'", feature: 'railway_ipc_consumer', protobuf: { type: .type, data: .decoded } ) end |
#status ⇒ Object
13 14 15 |
# File 'lib/railway_ipc/consumer/process_incoming_message.rb', line 13 def status 'unknown_message_type' end |