checks: no auto-const-set (was unclean), cl-parameter removed.
This commit is contained in:
parent
7832b62b51
commit
0480986133
2 changed files with 4 additions and 4 deletions
|
@ -16,7 +16,6 @@ TO DO AND DONE
|
|||
TODO
|
||||
----
|
||||
|
||||
* build packet with performance data
|
||||
* server side parsing of performance data
|
||||
* more documentations
|
||||
* mcrypt-support
|
||||
|
@ -30,6 +29,7 @@ DONE
|
|||
* server-API (recv from client)
|
||||
* check-API (describe checks and performance data)
|
||||
* fast usable API for sending checks
|
||||
* build packet with performance data
|
||||
|
||||
Copyright
|
||||
=========
|
||||
|
|
|
@ -186,12 +186,12 @@ module NSCA
|
|||
end
|
||||
|
||||
module Checks
|
||||
def perfdata( cl, *params) const_set cl, NSCA::PerformanceData.new( *params) end
|
||||
def perfdata( *params) NSCA::PerformanceData.new( *params) end
|
||||
|
||||
def check cl, service, hostname, perfdatas = nil
|
||||
def check service, hostname, perfdatas = nil
|
||||
perfdatas ||= []
|
||||
perfdatas.map! {|cl| cl.is_a?( Symbol) ? const_get( cl) : cl }
|
||||
const_set cl, NSCA::Check.new( service, hostname, perfdatas)
|
||||
NSCA::Check.new service, hostname, perfdatas
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue