Skip to content

Commit

Permalink
tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
artem committed Oct 6, 2024
1 parent 732669d commit 34da31c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
6 changes: 2 additions & 4 deletions backend/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#![recursion_limit = "1024"]
use std::{fmt::Display, path::PathBuf, sync::Arc, time::Duration};

use actix::{Actor, System};
use actix::Actor;

use actix_web::{get, guard, middleware::{ErrorHandlerResponse, ErrorHandlers}, route, web::{self, Data}, App, HttpRequest, HttpResponse, HttpServer, Responder};
use askama::Template;
Expand Down Expand Up @@ -223,13 +223,11 @@ async fn main() -> std::io::Result<()> {

tokio::spawn(async move {
tokio::signal::ctrl_c().await.expect("Failed to listen for ctrl_c");
log::info!("Received ctrl-c, stopping servers...");

native_clone.send(messages::native_messages::Stop).await.expect("Failed to stop servers");

server_handle.stop(true).await;

log::info!("Shutting down...");
System::current().stop();
});

server.await
Expand Down
4 changes: 2 additions & 2 deletions msrvmanager.service
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ After=docker.service

[Service]
Restart=always
ExecStart=/usr/bin/docker run --rm --init --name MSrvM --network host -v /opt/msrvManager:/data msrvmanager
ExecStop=/usr/bin/docker stop -t 2 MSrvM
ExecStart=/usr/bin/docker run --name MSrvM --network host -v /opt/msrvManager:/data msrvmanager
ExecStop=/usr/bin/docker stop --signal SIGTERM -t 150 MSrvM
ExecStopPost=/usr/bin/docker rm -f MSrvM

[Install]
Expand Down

0 comments on commit 34da31c

Please sign in to comment.