rsked/source.cc
/// A source is viable if it is not failed, and any resource it needs
/// is currently locatable.  Moreover, if it was marked failed more
/// than m_src_retry_secs ago its failure mark is cleared.
///
A source is viable if it is not failed, and any resource it needs
is currently locatable.  Moreover, if it was marked failed more
than m_src_retry_secs ago its failure mark is cleared.
A source is viable if it is not failed and any resource it needs is currently locatable . Moreover if it was marked failed more than m_src_retry_secs ago its failure mark is cleared .
bool Source::viable()
{
    if (m_failedp) {
        time_t dt = (time(0) - last_fail());
        if (dt > m_src_retry_secs) {
            LOG_INFO(Lgr) << "Schedule: time has passed...retry source {"
                          << m_name << "}";
            mark_failed(false);  
        }
    }
    if (m_failedp) return false;
    if (localp()) {
        boost::filesystem::path eff_path;
        if (not res_path(eff_path)) {
            return false;
        }
    }
    return true;
}
bool Source :: viable ( ) { if ( m_failedp ) { time_t dt = ( time ( 0 ) - last_fail ( ) ) ; if ( dt > m_src_retry_secs ) { LOG_INFO ( Lgr ) << " " << m_name << " " ; mark_failed ( false ) ; } } if ( m_failedp ) return false ; if ( localp ( ) ) { boost :: filesystem :: path eff_path ; if ( not res_path ( eff_path ) ) { return false ; } } return true ; }
A source is viable if it is not failed, and any resource it needs
is currently locatable.
A source is viable if it is not failed and any resource it needs is currently locatable .
// give it another chance // resource pre-check (currently only for local files) //