Changeset 1085
- Timestamp:
- 07/05/08 18:00:18 (5 years ago)
- Location:
- trunk
- Files:
-
- 2 modified
-
applications/shepherd (modified) (3 diffs)
-
status (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/applications/shepherd
r1084 r1085 2 2 3 3 our $progname = 'shepherd'; 4 my $version = '1.3.1 5';4 my $version = '1.3.16'; 5 5 6 6 # tv_grab_au … … 4226 4226 } 4227 4227 4228 # Don't bother reporting small gaps when we already know that this 4229 # grabber tends to have them. 4230 # 4228 4231 # It's actually difficult to say exactly which gaps are critical 4229 4232 # (or policy-violating), because our analysis operates on a … … 4231 4234 # in prime time is a policy violation, even though each individual 4232 4235 # gap isn't. So our solution is not perfect: we are simply 4233 # stripping SMALL gaps (less than 15 minutes), regardless of how 4234 # many there are. 4236 # disregarding SMALL gaps, regardless of how many there are. 4237 # 4238 # A gap is considered non-critical if it's: 4239 # (a) in peak time and less than 15 minutes long; or 4240 # (b) in nonpeak time and less than 30 minutes long; or 4241 # (c) in other time and less than 25 minutes long 4235 4242 sub is_noncritical_gap 4236 4243 { 4237 4244 my $gap = shift; 4238 4245 4239 return 1 if ($gap =~ /(\d+)-(\d+)/ and $2 - $1 < $policy{peak_max_missing}); 4240 return 0; 4246 return 0 unless ($gap =~ /(\d+)-(\d+)/); 4247 my $zero_hr = $policy{starttime} - $policy{first_bucket_offset}; 4248 4249 my $gap_start = (($1 - $zero_hr) % 86400); 4250 my $gap_stop = (($2 - $zero_hr) % 86400); 4251 my $diff = $gap_stop - $gap_start; 4252 4253 if ($gap_start <= $policy{peak_stop} and $gap_stop >= $policy{peak_start}) 4254 { 4255 # PEAK 4256 return ($diff < 15*60); 4257 } 4258 elsif ($gap_start <= $policy{nonpeak_stop} and $gap_stop >= $policy{nonpeak_start}) 4259 { 4260 # NONPEAK 4261 return ($diff < 30*60); 4262 } 4263 else 4264 { 4265 # OTHER 4266 return ($diff < 25*60); 4267 } 4241 4268 } 4242 4269 -
trunk/status
r1084 r1085 1 application shepherd 1.3.1 51 application shepherd 1.3.16 2 2 reference channel_list 22 3 3 reference Shepherd/Common.pm 0.36
