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

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

Instance Method Summary collapse

Methods inherited from Legion::Transport::Message

#content_encoding, #content_type, #encode_message, #encrypt?, #encrypt_message, #exchange_name, #expiration, #headers, #initialize, #message, #priority, #publish, #timestamp, #type, #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



18
19
20
# File 'lib/legion/transport/messages/task_update.rb', line 18

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

#routing_keyObject



14
15
16
# File 'lib/legion/transport/messages/task_update.rb', line 14

def routing_key
  'task.update'
end

#valid_statusObject



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

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