lightweight com.atproto.sync.listReposByCollection
45
fork

Configure Feed

Select the types of activity you want to include in your feed.

track how many requests host-throttling

phil b1441981 ccbc2e53

+8
+2
.gitignore
··· 1 1 /target 2 2 /lightrail.db 3 3 /local 4 + 5 + /lr2.db
+6
src/http.rs
··· 94 94 if let Some(host) = parts.uri.host() { 95 95 let limiter = self.shared.get_or_create_limiter(host); 96 96 while limiter.check().is_err() { 97 + metrics::gauge!("lightrail_http_host_thorottling").increment(1); 97 98 tokio::time::sleep(self.shared.token_interval).await; 99 + metrics::gauge!("lightrail_http_host_thorottling").decrement(1); 98 100 } 99 101 } 100 102 ··· 126 128 if let Some(host) = parts.uri.host() { 127 129 let limiter = self.shared.get_or_create_limiter(host); 128 130 while limiter.check().is_err() { 131 + metrics::gauge!("lightrail_http_host_thorottling").increment(1); 129 132 tokio::time::sleep(self.shared.token_interval).await; 133 + metrics::gauge!("lightrail_http_host_thorottling").decrement(1); 130 134 } 131 135 } 132 136 self.inner ··· 146 150 if let Some(host) = parts.uri.host() { 147 151 let limiter = self.shared.get_or_create_limiter(host); 148 152 while limiter.check().is_err() { 153 + metrics::gauge!("lightrail_http_host_thorottling").increment(1); 149 154 tokio::time::sleep(self.shared.token_interval).await; 155 + metrics::gauge!("lightrail_http_host_thorottling").decrement(1); 150 156 } 151 157 } 152 158 self.inner.send_http_bidirectional(parts, body).await