Changeset 1086

Show
Ignore:
Timestamp:
07/06/08 18:04:40 (5 years ago)
Author:
max
Message:

shepherd: Don't report MISSING_DATA for Shepherd beyond Day 6 (we still do report it for individual grabbers, if they claim to support further days); also tidy some logging messages.

Location:
trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/applications/shepherd

    r1085 r1086  
    22 
    33our $progname = 'shepherd'; 
    4 my $version = '1.3.16'; 
     4my $version = '1.3.17'; 
    55 
    66# tv_grab_au 
     
    16181618    my ($component, $field, @rest) = @_; 
    16191619 
     1620    &log("SHEPHERD: Set pending message: $component $field @rest\n") if ($debug); 
    16201621    my $iteration = 0; 
    16211622    my $componentname = $component; 
     
    27952796    if ($used_grabbers == 0) 
    27962797    { 
    2797         &log("SHEPHERD: No valid grabbers installed/enabled!\n"); 
     2798        &log("SHEPHERD: No valid grabbers available for $grab_policy stage.\n"); 
    27982799    } 
    27992800    elsif (!$data_satisfies_policy) 
    28002801    { 
    2801         &log("SHEPHERD: Ran through all grabbers but still have policy-violating gaps in data! :(\n"); 
     2802        &log("SHEPHERD: Ran through all grabbers but still have policy-violating gaps in data. :(\n"); 
    28022803    } 
    28032804    elsif (!$data_found_all) 
    28042805    { 
    2805         &log("SHEPHERD: Unfillable micro-gaps exist in data!\n"); 
     2806        &log("SHEPHERD: Unfillable micro-gaps exist in data.\n"); 
    28062807    } 
    28072808} 
     
    29222923  
    29232924        &log("SHEPHERD: Scoring grabbers on ability to efficiently provide needed data:\n"); 
    2924         &log("Only considering micro-grabbers.\n") if ($find_microgaps); 
     2925        &log("SHEPHERD: Only considering micro-grabbers.\n") if ($find_microgaps); 
    29252926        foreach (sort { $gscore->{$b} <=> $gscore->{$a} } keys %$gscore) 
    29262927        { 
     
    29752976 
    29762977        if (!$total) { # $grabber_policy ne "paytv" 
    2977             &log("Unfillable timeslice\n\n"); 
     2978            &log("SHEPHERD: Unfillable timeslice.\n\n"); 
    29782979            add_timeslice_to_missing_unfillable(); 
    29792980        } 
     
    41784179    my ($d, $proggy) = @_; 
    41794180 
    4180     if (defined $d->{already_missing}) { 
    4181         $d->{already_missing} .= sprintf "-%02d:%02d", 
    4182           int($d->{already_missing_last} / 3600), 
    4183           int(($d->{already_missing_last} % 3600) / 60) 
    4184           if (defined $d->{already_missing_last}); 
     4181    if (defined $d->{already_missing})  
     4182    { 
     4183        if (defined $d->{already_missing_last}) 
     4184        { 
     4185            $d->{already_missing} .= sprintf "-%02d:%02d", 
     4186                                             int($d->{already_missing_last} / 3600), 
     4187                                             int(($d->{already_missing_last} % 3600) / 60); 
     4188        } 
     4189 
    41854190        push(@{($d->{missing_all})}, $d->{already_missing}); 
    41864191 
    41874192        $d->{already_missing_epoch} .= sprintf "-%d",$d->{already_missing_last_epoch}; 
    41884193 
    4189         # Don't append this missing period to the 'missing_all_epoch' string 
    4190         # if it's a noncritical gap and we already know this grabber tends 
    4191         # to have those (eg yahoo7widget). We can do this because at the 
    4192         # grabber level 'missing_all_epoch' is used only for stats reporting,  
    4193         # not any further analysis. 
    4194         unless (query_config($proggy, 'has_noncritical_gaps') and is_noncritical_gap($d->{already_missing_epoch})) 
     4194        # $plugin_data -> 'missing_all_epoch' records MISSING_DATA for stats 
     4195        # reporting. We don't want to be bothered by data holes that are: 
     4196        # (a) 'Noncritical', and we already know this grabber tends 
     4197        #     to have those (eg yahoo7widget); or 
     4198        # (b) In Shepherd and Day 6 or higher. (This allows Shepherd to attempt 
     4199        #     to fill a longer schedule -- e.g. 14 days -- but not throw a lot 
     4200        #     of warnings if it fails to.) 
     4201        unless 
     4202           (( &query_config($proggy, 'has_noncritical_gaps') and &is_noncritical_gap($d->{already_missing_epoch})) 
     4203                or 
     4204            ( $proggy eq $progname and $d->{already_missing_epoch} =~ /(\d+)-/ and $1 > $policy{starttime} + (5*86400))) 
    41954205        { 
    41964206            $d->{missing_all_epoch} .= "," if (defined $d->{missing_all_epoch}); 
  • trunk/status

    r1085 r1086  
    1 application     shepherd            1.3.16 
     1application     shepherd            1.3.17 
    22reference       channel_list        22 
    33reference       Shepherd/Common.pm  0.36