const char* svn_options =
"checkout -q";
+namespace UpdateInterval
+{
+ // interval in seconds to allow an update to repeat after a successful update (=daily)
+ static const double SuccessfulAttempt = 24*60*60;
+ // interval in seconds to allow another update after a failed attempt (10 minutes)
+ static const double FailedAttempt = 10*60;
+};
+
typedef map<string,time_t> CompletedTiles;
///////////////////////////////////////////////////////////////////////////////
_completedTiles.find( next._dir );
time_t now = time(0);
if ((ii == _completedTiles.end())||
- ((ii->second + 60*60*24) < now ))
+ (ii->second < now ))
{
bool isNewDirectory = false;
{
_consecutive_errors++;
_fail_count++;
+ _completedTiles[ next._dir ] = now + UpdateInterval::FailedAttempt;
}
else
{
_is_dirty = true;
}
}
+ _completedTiles[ next._dir ] = now + UpdateInterval::SuccessfulAttempt;
}
_busy = false;
- _completedTiles[ next._dir ] = now;
}
if (_consecutive_errors >= 5)