lib/mutx/API/execution.rb in mutx-0.1.27 vs lib/mutx/API/execution.rb in mutx-0.1.28

- old
+ new

@@ -20,11 +20,15 @@ execution_name = nil custom_params = {} end error = false + + running_started = [] + running_started = Mutx::Database::MongoConnector.running_for_task task_name + is_there_task = Mutx::Tasks.is_there_task_with? task_name, type - if Mutx::Tasks.is_there_task_with? task_name, type + if ((is_there_task) && (running_started.empty?)) Mutx::Support::Log.debug "Starting working with task #{task_name}" if Mutx::Support::Log task = Mutx::Tasks::Task.get_task_with(task_name) task_id = task.id \ No newline at end of file