alpha
Login
or
Join now
microcosm.blue
/
microcosm-rs
Star
0
Fork
3
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
Constellation, Spacedust, Slingshot, UFOs: atproto crates and services for microcosm
Star
0
Fork
3
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
Overview
Issues
Pulls
Pipelines
add a `--print-cursor` debug flag
author
phil
date
1 month ago
(May 6, 2026, 5:03 PM -0400)
commit
ad3fe597
ad3fe59713a0518c3e86e9bbf6a541ecd9f8ecfa
parent
93f4b9e9
93f4b9e91453a5ef3af59443e24217b165db593e
+15
1 changed file
Expand all
Collapse all
Unified
Split
constellation
src
bin
main.rs
+15
constellation/src/bin/main.rs
Reviewed
···
67
67
/// fix the constellation start date (funny previous bug oops)
68
68
#[arg(long, action)]
69
69
reset_db_start: bool,
70
70
+
/// debugging: print the current jetstream cursor and exit
71
71
+
#[arg(long, action)]
72
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
94
+
95
95
+
#[cfg(feature = "rocks")]
96
96
+
if args.print_cursor {
97
97
+
let storage_dir = args.data.clone().unwrap_or("rocks.test".into());
98
98
+
let mut store = RocksStorage::open_readonly(storage_dir)?;
99
99
+
if let Some(cursor) = store.get_cursor()? {
100
100
+
println!("cursor: {cursor}");
101
101
+
} else {
102
102
+
println!("[no cursor]");
103
103
+
}
104
104
+
return Ok(());
105
105
+
}
91
106
92
107
println!("starting with storage backend: {:?}...", args.backend);
93
108