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.

add a `--print-cursor` debug flag

+15
+15
constellation/src/bin/main.rs
··· 67 67 /// fix the constellation start date (funny previous bug oops) 68 68 #[arg(long, action)] 69 69 reset_db_start: bool, 70 + /// debugging: print the current jetstream cursor and exit 71 + #[arg(long, action)] 72 + print_cursor: bool, 70 73 } 71 74 72 75 #[derive(Debug, Clone, ValueEnum)] ··· 88 91 89 92 fn main() -> Result<()> { 90 93 let args = Args::parse(); 94 + 95 + #[cfg(feature = "rocks")] 96 + if args.print_cursor { 97 + let storage_dir = args.data.clone().unwrap_or("rocks.test".into()); 98 + let mut store = RocksStorage::open_readonly(storage_dir)?; 99 + if let Some(cursor) = store.get_cursor()? { 100 + println!("cursor: {cursor}"); 101 + } else { 102 + println!("[no cursor]"); 103 + } 104 + return Ok(()); 105 + } 91 106 92 107 println!("starting with storage backend: {:?}...", args.backend); 93 108