···14141515 let pool = plc_mirror::connect_db().await?;
16161717- tokio::spawn(plc_mirror::import::importer(log.clone(), pool.clone()));
1717+ let start_after = plc_mirror::get_start_after(&pool).await?;
1818+1919+ tokio::spawn(plc_mirror::import::importer(
2020+ log.clone(),
2121+ pool.clone(),
2222+ start_after,
2323+ ));
18241925 let bind_address = var("PLC_BIND_ADDR")
2026 .unwrap_or(DEFAULT_BIND.to_string())
+3-1
src/sql/init.sql
···1616 created_at timestamptz not null default now(),
17171818 primary key (did, hash)
1919-);1919+);
2020+2121+create index if not exists operations_created on operations (created_at);