Class: Tester

Inherits:
QuartzPlugin show all
Defined in:
lib/plugins/tester.rb

Constant Summary collapse

@@version_major =
1
@@version_minor =
0
@@version_revision =
0

Instance Method Summary collapse

Methods inherited from QuartzPlugin

#get_version, #initialize, #payload, #run_result, #run_shell

Constructor Details

This class inherits a constructor from QuartzPlugin

Instance Method Details

#infoObject



9
10
11
# File 'lib/plugins/tester.rb', line 9

def info
	{ :uid => "c0bb6ed7950b489f9abba8071ff0e0ab", :name => "Tester", :version => get_version }
end

#run(message) ⇒ Object



13
14
15
16
17
18
19
20
21
# File 'lib/plugins/tester.rb', line 13

def run(message)
	@log.info "Running with #{message}"
	i = Random.rand(10)
	@log.info "Waiting for #{i} seconds"
	sleep i
	@log.info "Done"

	run_result(true, "Super! Done in #{i} seconds")
end