mirror of
https://github.com/romanz/electrs.git
synced 2024-11-19 09:54:09 +01:00
Run sync in a loop
This commit is contained in:
parent
7a200480a4
commit
cca0f270c2
@ -5,5 +5,9 @@ use electrs::{Config, Daemon, Tracker};
|
||||
fn main() -> Result<()> {
|
||||
let config = Config::from_args();
|
||||
let daemon = Daemon::connect(&config)?;
|
||||
Tracker::new(&config)?.sync(&daemon)
|
||||
let mut tracker = Tracker::new(&config)?;
|
||||
loop {
|
||||
tracker.sync(&daemon)?;
|
||||
std::thread::sleep(config.wait_duration);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user