From f4678f5c4e8564348e2cb6ab4971a8fc78388cdb Mon Sep 17 00:00:00 2001 From: "Willow (GHOST)" Date: Mon, 27 Jul 2026 15:55:50 +0100 Subject: [PATCH] fix(uplc): add more startup logs --- uplc/src/db.rs | 6 ++++++ uplc/src/main.rs | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/uplc/src/db.rs b/uplc/src/db.rs index 7f13279..d72e2cb 100644 --- a/uplc/src/db.rs +++ b/uplc/src/db.rs @@ -12,6 +12,10 @@ impl DB { let pool = r2d2::Pool::new(manager)?; let connection = pool.get()?; + println!(" setting temp directory"); + connection.execute("SET temp_directory = '/tmp/atmo-stats-ddb';", [])?; + + println!(" creating operations table (if not exists)"); connection.execute( r#"CREATE TABLE IF NOT EXISTS operations ( did TEXT NOT NULL, @@ -27,11 +31,13 @@ impl DB { [], )?; + println!(" creating (did, seq) index (if not exists)"); connection.execute( "CREATE INDEX IF NOT EXISTS idx_operations_did_seq ON operations(did, seq DESC)", [], )?; + println!(" creating created_at index (if not exists)"); connection.execute( "CREATE INDEX IF NOT EXISTS idx_operations_created_at ON operations(created_at)", [], diff --git a/uplc/src/main.rs b/uplc/src/main.rs index a9ed093..5422b5b 100644 --- a/uplc/src/main.rs +++ b/uplc/src/main.rs @@ -24,9 +24,11 @@ struct Args { async fn main() -> Result<()> { color_eyre::install()?; let args = Args::parse(); + + println!("Starting database..."); let db = DB::new("./.data/uplc.db".into())?; - println!("Loading initial stats..."); + println!("Done! Loading initial stats..."); let stats = Arc::new(RwLock::new(Stats::default())); stats.write().await.refresh(&db)?; -- knotmirror 0.0.1