Something went wrong. Try again.
Personal ATProto tools.
Something went wrong. Try again.
970 B · 23 lines
Rust
at main
123456789101112131415161718192021222324//! Main entrypoint.
#[tokio::main(flavor = "current_thread")]async fn main() -> Result<(), Box<dyn std::error::Error>> { let subscriber = tracing_subscriber::fmt() .compact() // Use a more compact, abbreviated log format .with_file(true) // Display source code file paths .with_line_number(true) // Display source code line numbers .with_thread_ids(true) // Display the thread ID an event was recorded on .with_target(false) // Don't display the event's target (module path) .finish(); // Build the subscriber tracing::subscriber::set_global_default(subscriber)?; loop { if let Err(e) = atproto_teq::jetstream::main_jetstream().await { tracing::error!("Error in main_jetstream: {:?}", e); break; } else { tracing::info!("Restarting main_jetstream"); tokio::time::sleep(tokio::time::Duration::from_secs(15)).await; } } Ok(())}