Changeset 3360
- Timestamp:
- 02/14/10 14:48:02 (6 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
people/snide/pre_1.5/master/lib/Munin/Master/UpdateWorker.pm
r3357 r3360 89 89 # Check if this plugin has to be updated 90 90 my $update_rate = get_global_service_value(\%service_config, $plugin, "update_rate", 0); 91 my ($update_rate_in_seconds, $is_update_ discrete) = parse_update_rate($update_rate);91 my ($update_rate_in_seconds, $is_update_aligned) = parse_update_rate($update_rate); 92 92 # default is 0 sec : always update when asked 93 93 DEBUG "[DEBUG] update_rate $update_rate_in_seconds for $plugin on $nodedesignation"; … … 103 103 } 104 104 105 # If update_rate is discrete, round the "when" for granularity106 if ($is_update_ discrete) {105 # If update_rate is aligned, round the "when" for alignement 106 if ($is_update_aligned) { 107 107 foreach my $service (keys %service_data) { 108 108 my $current_service_data = $service_data{$service}; … … 227 227 sub parse_update_rate { 228 228 my ($update_rate_config) = @_; 229 #$update_rate_config = $config->_trim($update_rate_config); 230 231 my ($is_update_discrete, $update_rate_in_sec); 232 if ($update_rate_config =~ m/(\d+[a-z]?) (discrete)?/) { 229 230 my ($is_update_aligned, $update_rate_in_sec); 231 if ($update_rate_config =~ m/(\d+[a-z]?) (aligned)?/) { 233 232 $update_rate_in_sec = to_sec($1); 234 $is_update_ discrete= $2;233 $is_update_aligned = $2; 235 234 } else { 236 235 return (0, 0); 237 236 } 238 237 239 return ($update_rate_in_sec, $is_update_ discrete);238 return ($update_rate_in_sec, $is_update_aligned); 240 239 } 241 240
