diff options
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs index b88e757..7297a96 100644 --- a/src/main.rs +++ b/src/main.rs @@ -125,8 +125,12 @@ fn main() -> anyhow::Result<()> { // behind the database, close the gap before anyone asks for it. let _ = pipeline::publish::reconcile(&cfg, &db); let stop = std::sync::Arc::new(std::sync::atomic::AtomicBool::new(false)); - aur_build::watch::scheduler::spawn_scheduler(std::sync::Arc::new(cfg.clone()), db.clone(), stop); + aur_build::watch::scheduler::spawn_scheduler(std::sync::Arc::new(cfg.clone()), db.clone(), stop.clone()); let _server = aur_build::http::spawn(cfg.clone(), db.clone())?; + // The dispatcher reaps expired leases before its first claim, so a + // restart recovers whatever a crash left leased without any special + // startup routine (§8.2). + let _pool = aur_build::pipeline::dispatch::Pool::spawn(std::sync::Arc::new(cfg.clone()), db.clone()); println!("serving on http://{} — ctrl-c to stop", cfg.bind); // Single process, thread per connection: the main thread has nothing to // do but wait to be killed. |
