Personal ATProto tools.
0

Configure Feed

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

at main 970 B View raw
1//! Main entrypoint. 2 3#[tokio::main(flavor = "current_thread")] 4async fn main() -> Result<(), Box<dyn std::error::Error>> { 5 let subscriber = tracing_subscriber::fmt() 6 .compact() // Use a more compact, abbreviated log format 7 .with_file(true) // Display source code file paths 8 .with_line_number(true) // Display source code line numbers 9 .with_thread_ids(true) // Display the thread ID an event was recorded on 10 .with_target(false) // Don't display the event's target (module path) 11 .finish(); // Build the subscriber 12 tracing::subscriber::set_global_default(subscriber)?; 13 loop { 14 if let Err(e) = atproto_teq::jetstream::main_jetstream().await { 15 tracing::error!("Error in main_jetstream: {:?}", e); 16 break; 17 } else { 18 tracing::info!("Restarting main_jetstream"); 19 tokio::time::sleep(tokio::time::Duration::from_secs(15)).await; 20 } 21 } 22 Ok(()) 23}