Sha256: 8939499b935e0dd680bf47e835823e112d360bb203e3a815ae50be89ddeb77bd

Contents?: true

Size: 914 Bytes

Versions: 3

Compression:

Stored size: 914 Bytes

Contents

#
# Run a RightScript
#
module Chimp
  class ExecRightScript < Executor

    attr_accessor :audit_entry_data, :audit_entry_url

    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)
        @audit_entry_url = task.friendly_url
        task.wait_for_state('completed', @timeout)

        @results = task.state
        @audit_entry_data = task.details
      end
    end

    def describe_work
      "[#{@job_uuid}] ExecRightScript job_id=#{@job_id} script=\"#{@exec.params['right_script']['name']}\" server=\"#{@server.nickname}\""
    end

    def info
      @exec.params['right_script']['name']
    end

    def target
      @server.nickname
    end

  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
right_chimp-2.1.28 lib/right_chimp/exec/ExecRightScript.rb
right_chimp-2.1.27 lib/right_chimp/exec/ExecRightScript.rb
right_chimp-2.1.26 lib/right_chimp/exec/ExecRightScript.rb