Class: Chimp::ExecRightScript
- Defined in:
- lib/right_chimp/exec/ExecRightScript.rb
Constant Summary
Constants inherited from Executor
Chimp::Executor::STATUS_DONE, Chimp::Executor::STATUS_ERROR, Chimp::Executor::STATUS_HOLDING, Chimp::Executor::STATUS_NONE, Chimp::Executor::STATUS_RETRYING, Chimp::Executor::STATUS_RUNNING
Instance Attribute Summary collapse
-
#audit_entry_data ⇒ Object
Returns the value of attribute audit_entry_data.
Attributes inherited from Executor
#array, #dry_run, #error, #exec, #group, #inputs, #job_id, #job_notes, #job_uuid, #owner, #quiet, #results, #retry_count, #retry_sleep, #server, #status, #template, #time_end, #time_start, #timeout, #verbose
Instance Method Summary collapse
Methods inherited from Executor
#cancel, #get_total_exec_time, #initialize, #queue, #requeue
Constructor Details
This class inherits a constructor from Chimp::Executor
Instance Attribute Details
#audit_entry_data ⇒ Object
Returns the value of attribute audit_entry_data.
7 8 9 |
# File 'lib/right_chimp/exec/ExecRightScript.rb', line 7 def audit_entry_data @audit_entry_data end |
Instance Method Details
#describe_work ⇒ Object
26 27 28 |
# File 'lib/right_chimp/exec/ExecRightScript.rb', line 26 def describe_work return "[#{@job_uuid}] ExecRightScript job_id=#{@job_id} script=\"#{@exec.params['right_script']['name']}\" server=\"#{@server.nickname}\"" end |
#info ⇒ Object
30 31 32 |
# File 'lib/right_chimp/exec/ExecRightScript.rb', line 30 def info return @exec.params['right_script']['name'] end |
#run ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/right_chimp/exec/ExecRightScript.rb', line 9 def run = {: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, ) task.wait_for_state("completed", @timeout) @results = task.state @audit_entry_data = task.details end end |
#target ⇒ Object
34 35 36 |
# File 'lib/right_chimp/exec/ExecRightScript.rb', line 34 def target return @server.nickname end |