MCPcopy Create free account
hub / github.com/Dstack-TEE/dstack / start_recycle_thread

Function start_recycle_thread

gateway/src/main_service.rs:511–522  ·  view source on GitHub ↗
(proxy: Proxy)

Source from the content-addressed store, hash-verified

509}
510
511fn 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
525async fn start_certbot_task(proxy: Proxy) {

Callers 1

start_bg_tasksMethod · 0.85

Calls 2

recycleMethod · 0.80
lockMethod · 0.45

Tested by

no test coverage detected