lib/right_chimp/exec/ExecRightScript.rb in right_chimp-2.1.14 vs lib/right_chimp/exec/ExecRightScript.rb in right_chimp-2.1.15
- old
+ new
@@ -2,38 +2,39 @@
# Run a RightScript
#
module Chimp
class ExecRightScript < Executor
- attr_accessor :audit_entry_data
+ attr_accessor :audit_entry_data, :audit_entry_url
def run
- options = {:ignore_lock => true}.merge(@inputs)
+ options = { ignore_lock: true }.merge(@inputs)
if @timeout < 300
- Log.error "timeout was less than 5 minutes! resetting to 5 minutes"
+ 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)
+ @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
- return "[#{@job_uuid}] ExecRightScript job_id=#{@job_id} script=\"#{@exec.params['right_script']['name']}\" server=\"#{@server.nickname}\""
+ "[#{@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']
+ @exec.params['right_script']['name']
end
def target
- return @server.nickname
+ @server.nickname
end
end
end