Class: Legion::Transport::Messages::TaskLog
Constant Summary
Legion::Transport::Message::ENVELOPE_KEYS
Constants included
from Common
Common::NAMESPACE_BOUNDARIES
Instance Method Summary
collapse
#app_id, #channel, #content_encoding, #content_type, #correlation_id, #encode_message, #encrypt?, #encrypt_message, #exchange_name, #expiration, #headers, #initialize, max_payload_bytes, #message_id, #persistent, #priority, #publish, #reply_to, #timestamp, #type, #user_id
Methods included from Common
#channel, #channel_open?, #close, #close!, #deep_merge, #generate_consumer_tag, #open_channel, #options_builder
Instance Method Details
#generate_task? ⇒ Boolean
23
24
25
|
# File 'lib/legion/transport/messages/task_log.rb', line 23
def generate_task?
false
end
|
#message ⇒ Object
17
18
19
20
21
|
# File 'lib/legion/transport/messages/task_log.rb', line 17
def message
@options[:function] = 'add_log'
@options[:runner_class] = 'Legion::Extensions::Tasker::Runners::Log'
@options
end
|
#routing_key ⇒ Object
9
10
11
|
# File 'lib/legion/transport/messages/task_log.rb', line 9
def routing_key
"task.logs.create.#{@options[:task_id]}"
end
|
#validate ⇒ Object
27
28
29
30
31
32
|
# File 'lib/legion/transport/messages/task_log.rb', line 27
def validate
@options[:task_id] = @options[:task_id].to_i if @options[:task_id].is_a? String
raise "task_id must be an integer but is #{@options[:task_id].class}(#{@options[:task_id]})" unless @options[:task_id].is_a? Integer
@valid = true
end
|