(proxy: Proxy)
| 509 | } |
| 510 | |
| 511 | fn start_recycle_thread(proxy: Proxy) { |
| 512 | if !proxy.config.recycle.enabled { |
| 513 | info!("recycle is disabled"); |
| 514 | return; |
| 515 | } |
| 516 | std::thread::spawn(move || loop { |
| 517 | std::thread::sleep(proxy.config.recycle.interval); |
| 518 | if let Err(err) = proxy.lock().recycle() { |
| 519 | error!("failed to run recycle: {err:?}"); |
| 520 | }; |
| 521 | }); |
| 522 | } |
| 523 | |
| 524 | /// Start periodic certificate renewal task for multi-domain certbot |
| 525 | async fn start_certbot_task(proxy: Proxy) { |
no test coverage detected