cooling/cooling.cc
/// If rsked is enabled, attempt to start rsked -- up to
/// Max_rsked_restarts times. If this fails, then mark rsked as
/// broken and turn on red LED and return false. Retry again after
/// Rsked_restart_cooldown_secs.  If rsked is disabled, then terminate
/// any running copy and return false;
///
If rsked is enabled, attempt to start rsked -- up to
Max_rsked_restarts times. If this fails, then mark rsked as
broken and turn on red LED and return false. Retry again after
Rsked_restart_cooldown_secs.  If rsked is disabled, then terminate
any running copy and return false.
If rsked is enabled attempt to start rsked -- up to Max_rsked_restarts times . If this fails then mark rsked as broken and turn on red LED and return false . Retry again after Rsked_restart_cooldown_secs . If rsked is disabled then terminate any running copy and return false .
bool Cooling::start_rsked()
{
    if (not m_rsked_enabled) {
        terminate_rsked();
        return false;
    }
    if (m_rsked_broken) {
        time_t tnow = time(0);
        if ((tnow - m_last_failed_start) < Rsked_restart_cooldown_secs) {
            return false;
        }
        m_rsked_broken = false; 
        m_last_failed_start = 0;
        LOG_INFO(Lgr) << "Time has passed, try restarting rsked again...";
        illuminate_red(false);
    }
    for (int i=Max_rsked_restarts; i>0; --i) {
        if (start_rsked_once()) return true;
    }
    mark_rsked_broken(time(0));
    LOG_ERROR(Lgr) << "Giving up restarts for a while--check rsked config";
    return false;
}
bool Cooling :: start_rsked ( ) { if ( not m_rsked_enabled ) { terminate_rsked ( ) ; return false ; } if ( m_rsked_broken ) { time_t tnow = time ( 0 ) ; if ( ( tnow - m_last_failed_start ) < Rsked_restart_cooldown_secs ) { return false ; } m_rsked_broken = false ; m_last_failed_start = 0 ; LOG_INFO ( Lgr ) << " " ; illuminate_red ( false ) ; } for ( int i = Max_rsked_restarts ; i > 0 ; -- i ) { if ( start_rsked_once ( ) ) return true ; } mark_rsked_broken ( time ( 0 ) ) ; LOG_ERROR ( Lgr ) << " " ; return false ; }
If rsked is enabled, attempt to start rsked -- up to
Max_rsked_restarts times.
If rsked is enabled attempt to start rsked -- up to Max_rsked_restarts times .
// suppose it is working again... //