Sha256: 59f78b17eaeece89b68e5bd0c16528cd3870cfabad34137c1209907675eff200

Contents?: true

Size: 656 Bytes

Versions: 3

Compression:

Stored size: 656 Bytes

Contents

module Rundock
  module Operation
    class Task < Base
      def run(backend, attributes = {})
        @instruction.each do |i|
          unless attributes[:task_info].key?(i.to_sym)
            Logger.warn("task not found and ignored: #{i}")
            next
          end

          scenario = Rundock::Builder::ScenarioBuilder.new(nil, nil).build_task(
            attributes[:task_info][i.to_sym], backend, Rundock::Attribute::NodeAttribute.new(attributes)
          )

          Logger.info("start task: #{i}")

          Logger.formatter.rec_lock

          scenario.run
          Logger.formatter.rec_unlock
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rundock-1.0.1 lib/rundock/operation/task.rb
rundock-1.0.0 lib/rundock/operation/task.rb
rundock-0.5.8 lib/rundock/operation/task.rb