Class: Legion::Transport::Messages::TaskUpdate

Inherits:
Legion::Transport::Message show all
Defined in:
lib/legion/transport/messages/task_update.rb

Constant Summary

Constants inherited from Legion::Transport::Message

Legion::Transport::Message::ENVELOPE_KEYS

Constants included from Common

Common::NAMESPACE_BOUNDARIES

Instance Method Summary collapse

Methods inherited from Legion::Transport::Message

#app_id, #channel, #content_encoding, #content_type, #correlation_id, #encode_message, #encrypt?, #encrypt_message, #exchange_name, #expiration, #headers, #initialize, max_payload_bytes, #message, #message_id, #persistent, #priority, #publish, #reply_to, #timestamp, #type, #user_id, #validate

Methods included from Common

#channel, #channel_open?, #close, #close!, #deep_merge, #generate_consumer_tag, #open_channel, #options_builder

Constructor Details

This class inherits a constructor from Legion::Transport::Message

Instance Method Details

#exchangeObject



20
21
22
# File 'lib/legion/transport/messages/task_update.rb', line 20

def exchange
  Legion::Transport::Exchanges::Task
end

#routing_keyObject



16
17
18
# File 'lib/legion/transport/messages/task_update.rb', line 16

def routing_key
  'task.update'
end

#valid_statusObject



24
25
26
27
28
29
# File 'lib/legion/transport/messages/task_update.rb', line 24

def valid_status
  conditioner = ['conditioner.queued', 'conditioner.failed', 'conditioner.exception']
  transformer = ['transformer.queued', 'transformer.succeeded', 'transformer.exception']
  task = ['task.scheduled', 'task.queued', 'task.completed', 'task.exception', 'task.delayed']
  conditioner + transformer + task
end