tangled
alpha
login
or
join now
ptr.pet
/
hydrant
24
fork
atom
at protocol indexer with flexible filtering, xrpc queries, and a cursor-backed event stream, built on fjall
at-protocol
atproto
indexer
rust
fjall
24
fork
atom
overview
issues
6
pulls
pipelines
[crawler] make sure we insert the retry state if at max attempt
ptr.pet
5 days ago
e7bd21eb
2feb1078
verified
This commit was signed with the committer's
known signature
.
ptr.pet
SSH Key Fingerprint:
SHA256:Abmvag+juovVufZTxyWY8KcVgrznxvBjQpJesv071Aw=
+12
-11
1 changed file
expand all
collapse all
unified
split
src
crawler
mod.rs
+12
-11
src/crawler/mod.rs
···
785
785
attempts: prev_attempts,
786
786
..state
787
787
};
788
788
-
if let Some(next) = carried.next_attempt() {
789
789
-
batch.insert(
790
790
-
&db.crawler,
791
791
-
keys::crawler_retry_key(&did),
792
792
-
rmp_serde::to_vec(&next)
793
793
-
.into_diagnostic()
794
794
-
.wrap_err("cant ser retry state")?,
795
795
-
);
796
796
-
}
797
797
-
// next_attempt() == None means we've hit the cap;
798
798
-
// leave the existing entry untouched for API inspection
788
788
+
let next = match carried.next_attempt() {
789
789
+
Some(next) => next,
790
790
+
None => RetryState {
791
791
+
attempts: MAX_RETRY_ATTEMPTS,
792
792
+
..state
793
793
+
},
794
794
+
};
795
795
+
batch.insert(
796
796
+
&db.crawler,
797
797
+
keys::crawler_retry_key(&did),
798
798
+
rmp_serde::to_vec(&next).into_diagnostic()?,
799
799
+
);
799
800
}
800
801
}
801
802
}