exponential backoff is now just bees. did you want bees? no? well you have them now. congrats

This commit is contained in:
Jacob Taylor 2025-08-02 20:59:02 -07:00
commit abe234537f
4 changed files with 5 additions and 5 deletions

View file

@ -100,7 +100,7 @@ impl Service {
/// Pings the presence of the given user in the given room, setting the /// Pings the presence of the given user in the given room, setting the
/// specified state. /// specified state.
pub async fn ping_presence(&self, user_id: &UserId, new_state: &PresenceState) -> Result<()> { pub async fn ping_presence(&self, user_id: &UserId, new_state: &PresenceState) -> Result<()> {
const REFRESH_TIMEOUT: u64 = 60 * 1000; const REFRESH_TIMEOUT: u64 = 60 * 1000 * 4;
let last_presence = self.db.get_presence(user_id).await; let last_presence = self.db.get_presence(user_id).await;
let state_changed = match last_presence { let state_changed = match last_presence {

View file

@ -53,9 +53,9 @@ impl Resolver {
opts.cache_size = config.dns_cache_entries as usize; opts.cache_size = config.dns_cache_entries as usize;
opts.preserve_intermediates = true; opts.preserve_intermediates = true;
opts.negative_min_ttl = Some(Duration::from_secs(config.dns_min_ttl_nxdomain)); opts.negative_min_ttl = Some(Duration::from_secs(config.dns_min_ttl_nxdomain));
opts.negative_max_ttl = Some(Duration::from_secs(60 * 60 * 24 * 30)); opts.negative_max_ttl = Some(Duration::from_secs(60 * 60 * 24));
opts.positive_min_ttl = Some(Duration::from_secs(config.dns_min_ttl)); opts.positive_min_ttl = Some(Duration::from_secs(config.dns_min_ttl));
opts.positive_max_ttl = Some(Duration::from_secs(60 * 60 * 24 * 7)); opts.positive_max_ttl = Some(Duration::from_secs(60 * 60 * 24));
opts.timeout = Duration::from_secs(config.dns_timeout); opts.timeout = Duration::from_secs(config.dns_timeout);
opts.attempts = config.dns_attempts as usize; opts.attempts = config.dns_attempts as usize;
opts.try_tcp_on_error = config.dns_tcp_fallback; opts.try_tcp_on_error = config.dns_tcp_fallback;

View file

@ -79,7 +79,7 @@ where
{ {
// Exponential backoff // Exponential backoff
const MIN_DURATION: u64 = 60 * 2; const MIN_DURATION: u64 = 60 * 2;
const MAX_DURATION: u64 = 60 * 60 * 8; const MAX_DURATION: u64 = 60 * 60;
if continue_exponential_backoff_secs( if continue_exponential_backoff_secs(
MIN_DURATION, MIN_DURATION,
MAX_DURATION, MAX_DURATION,

View file

@ -46,7 +46,7 @@ where
{ {
// Exponential backoff // Exponential backoff
const MIN_DURATION: u64 = 5 * 60; const MIN_DURATION: u64 = 5 * 60;
const MAX_DURATION: u64 = 60 * 60 * 24; const MAX_DURATION: u64 = 60 * 60;
if continue_exponential_backoff_secs(MIN_DURATION, MAX_DURATION, time.elapsed(), *tries) { if continue_exponential_backoff_secs(MIN_DURATION, MAX_DURATION, time.elapsed(), *tries) {
debug!( debug!(
?tries, ?tries,