Sha256: b8c8a42257020e0548f62a97ab48b7fb417fc4082744b0582ad158024af7866b

Contents?: true

Size: 836 Bytes

Versions: 12

Compression:

Stored size: 836 Bytes

Contents

#
# Run a RightScript
#
module Chimp
  class ExecRightScript < Executor
  
    def run
      options = {:ignore_lock => true}.merge(@inputs)
      
      if @timeout < 300
        Log.error "timeout was less than 5 minutes! resetting to 5 minutes"
        @timeout = 300
      end
    
      run_with_retry do
        task=Task.new
        task.tasker = @server.run_executable(@exec, options)
        task.wait_for_state("completed", @timeout)
        @results = task.tasker.show.summary
      end
    end
    
    def describe_work
      return "[#{@job_uuid}] ExecRightScript job_id=#{@job_id} script=\"#{@exec.params['right_script']['name']}\" server=\"#{@server.nickname}\""
    end
    
    def info
      return @exec.params['right_script']['name']
    end
    
    def target
      return @server.nickname
    end
    
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
right_chimp-2.1.10 lib/right_chimp/exec/ExecRightScript.rb
right_chimp-2.1.8 lib/right_chimp/exec/ExecRightScript.rb
right_chimp-2.1.7 lib/right_chimp/exec/ExecRightScript.rb
right_chimp-2.1.6 lib/right_chimp/exec/ExecRightScript.rb
right_chimp-2.1.5 lib/right_chimp/exec/ExecRightScript.rb
right_chimp-2.1.4 lib/right_chimp/exec/ExecRightScript.rb
right_chimp-2.1.3 lib/right_chimp/exec/ExecRightScript.rb
right_chimp-2.1.2 lib/right_chimp/exec/ExecRightScript.rb
right_chimp-2.1.0 lib/right_chimp/exec/ExecRightScript.rb
right_chimp-2.0.2 lib/right_chimp/exec/ExecRightScript.rb
right_chimp-2.0.1 lib/right_chimp/exec/ExecRightScript.rb
right_chimp-2.0 lib/right_chimp/exec/ExecRightScript.rb