Sha256: fbc07a507218980dead3368ae863b59b1ec29bf1bb567e48042955bec8f64ae9
Contents?: true
Size: 886 Bytes
Versions: 13
Compression:
Stored size: 886 Bytes
Contents
require 'legion/transport/exchanges/task' module Legion module Transport module Messages class TaskLog < Legion::Transport::Message def routing_key "task.logs.create.#{@options[:task_id]}" end def exchange Legion::Transport::Exchanges::Task end def message @options[:function] = 'add_log' @options[:runner_class] = 'Legion::Extensions::Tasker::Runners::Log' @options end def generate_task? false end 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 end end end end
Version data entries
13 entries across 13 versions & 2 rubygems