mirror of
https://github.com/romanz/electrs.git
synced 2025-02-24 15:02:21 +01:00
Run sync in a loop
This commit is contained in:
parent
7a200480a4
commit
cca0f270c2
1 changed files with 5 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue