(figment: Figment)
| 96 | } |
| 97 | |
| 98 | pub fn rocket(figment: Figment) -> Rocket<Build> { |
| 99 | let supervisor = Supervisor::new(); |
| 100 | let rocket = rocket::custom(figment).manage(supervisor.clone()).mount( |
| 101 | "/", |
| 102 | routes![deploy, start, stop, remove, list, info, ping, clear, shutdown], |
| 103 | ); |
| 104 | tokio::spawn(handle_shutdown_signals(supervisor)); |
| 105 | rocket |
| 106 | } |
| 107 | |
| 108 | async fn handle_shutdown_signals(supervisor: Supervisor) { |
| 109 | let ctrl_c = async { |
no test coverage detected