Constellation, Spacedust, Slingshot, UFOs: atproto crates and services for microcosm
0

Configure Feed

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

handle batch insert errors in other tests

...by bailing

+12 -9
+6 -6
ufos/src/lib.rs
··· 225 225 record: RawValue::from_string("{}".to_string())?, 226 226 is_update: false, 227 227 }), 228 - }); 228 + })?; 229 229 230 230 commits.truncating_insert(UFOsCommit { 231 231 cursor: Cursor::from_raw_u64(101), ··· 236 236 record: RawValue::from_string("{}".to_string())?, 237 237 is_update: false, 238 238 }), 239 - }); 239 + })?; 240 240 241 241 commits.truncating_insert(UFOsCommit { 242 242 cursor: Cursor::from_raw_u64(102), ··· 247 247 record: RawValue::from_string("{}".to_string())?, 248 248 is_update: false, 249 249 }), 250 - }); 250 + })?; 251 251 252 252 assert_eq!(commits.total_seen, 3); 253 253 assert_eq!(commits.dids_estimate.estimate(), 1); ··· 282 282 rkey: RecordKey::new("rkey-asdf-a".to_string()).unwrap(), 283 283 rev: "rev-asdf".to_string(), 284 284 action: CommitAction::Cut, 285 - }); 285 + })?; 286 286 287 287 commits.truncating_insert(UFOsCommit { 288 288 cursor: Cursor::from_raw_u64(101), ··· 293 293 record: RawValue::from_string("{}".to_string())?, 294 294 is_update: false, 295 295 }), 296 - }); 296 + })?; 297 297 298 298 commits.truncating_insert(UFOsCommit { 299 299 cursor: Cursor::from_raw_u64(102), ··· 304 304 record: RawValue::from_string("{}".to_string())?, 305 305 is_update: false, 306 306 }), 307 - }); 307 + })?; 308 308 309 309 assert_eq!(commits.total_seen, 2); 310 310 assert_eq!(commits.dids_estimate.estimate(), 1);
+6 -3
ufos/src/storage_fjall.rs
··· 1198 1198 .commits_by_nsid 1199 1199 .entry(collection.clone()) 1200 1200 .or_default() 1201 - .truncating_insert(commit); 1201 + .truncating_insert(commit) 1202 + .unwrap(); 1202 1203 1203 1204 collection 1204 1205 } ··· 1238 1239 .commits_by_nsid 1239 1240 .entry(collection.clone()) 1240 1241 .or_default() 1241 - .truncating_insert(commit); 1242 + .truncating_insert(commit) 1243 + .unwrap(); 1242 1244 1243 1245 collection 1244 1246 } ··· 1268 1270 .commits_by_nsid 1269 1271 .entry(collection.clone()) 1270 1272 .or_default() 1271 - .truncating_insert(commit); 1273 + .truncating_insert(commit) 1274 + .unwrap(); 1272 1275 1273 1276 collection 1274 1277 }