lib/mutx/tasks/task.rb in mutx-0.1.53 vs lib/mutx/tasks/task.rb in mutx-0.1.54

- old
+ new

@@ -41,11 +41,12 @@ :th, :fr, :sa, :su, :start_time, - :stop_time + :stop_time, + :stop_bots REGEX_VALID_VALUES = ["failed","passed","none"] NOTIFY_VALID_VALUES = ["any","passed","failed"] def self.valid_types @@ -89,10 +90,11 @@ @sa = task_data["sa"] @su = task_data["su"] @start_time = task_data["start_time"] @stop_time = task_data["stop_time"] @notify_on = task_data["notify_on"] || "any" + @stop_bots = task_data["stop_bots"] else Mutx::Support::Log.error "Creting task object. Argument is not a hash" if Mutx::Support::Log raise "Task data not defined correctly. Expecting info about task" end save! @@ -154,11 +156,12 @@ "sa" => data["sa"], "su" => data["su"], "start_time" => data["start_time"], "stop_time" => data["stop_time"], "value_for_regex" => data["value_for_regex"], - "notify_on" => data["notify_on"] + "notify_on" => data["notify_on"], + "stop_bots" => data["stop_bots"] } self.new(task_data) end def self.validate_and_create(data) @@ -294,10 +297,11 @@ "sa" => sa, "su" => su, "start_time" => start_time, "stop_time" => stop_time, "value_for_regex" => value_for_regex, - "notify_on" => notify_on + "notify_on" => notify_on, + "stop_bots" => stop_bots } end def has_custom_params? !@custom_params.empty? \ No newline at end of file