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