mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 12:11:56 +00:00
fix output error on stop
This commit is contained in:
@@ -15,6 +15,7 @@ use torut::onion::TorSecretKeyV3;
|
|||||||
use tracing::instrument;
|
use tracing::instrument;
|
||||||
|
|
||||||
use crate::action::docker::DockerAction;
|
use crate::action::docker::DockerAction;
|
||||||
|
use crate::action::NoOutput;
|
||||||
use crate::context::RpcContext;
|
use crate::context::RpcContext;
|
||||||
use crate::net::interface::InterfaceId;
|
use crate::net::interface::InterfaceId;
|
||||||
use crate::notifications::{NotificationLevel, NotificationSubtype};
|
use crate::notifications::{NotificationLevel, NotificationSubtype};
|
||||||
@@ -143,13 +144,15 @@ pub enum OnStop {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[instrument(skip(state))]
|
#[instrument(skip(state))]
|
||||||
async fn run_main(state: &Arc<ManagerSharedState>) -> Result<Result<(), (i32, String)>, Error> {
|
async fn run_main(
|
||||||
|
state: &Arc<ManagerSharedState>,
|
||||||
|
) -> Result<Result<NoOutput, (i32, String)>, Error> {
|
||||||
let rt_state = state.clone();
|
let rt_state = state.clone();
|
||||||
let mut runtime = tokio::spawn(async move {
|
let mut runtime = tokio::spawn(async move {
|
||||||
rt_state
|
rt_state
|
||||||
.manifest
|
.manifest
|
||||||
.main
|
.main
|
||||||
.execute::<(), ()>(
|
.execute::<(), NoOutput>(
|
||||||
&rt_state.ctx,
|
&rt_state.ctx,
|
||||||
&rt_state.manifest.id,
|
&rt_state.manifest.id,
|
||||||
&rt_state.manifest.version,
|
&rt_state.manifest.version,
|
||||||
@@ -300,7 +303,7 @@ impl Manager {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
match run_main(&thread_shared).await {
|
match run_main(&thread_shared).await {
|
||||||
Ok(Ok(())) => {
|
Ok(Ok(NoOutput)) => {
|
||||||
thread_shared
|
thread_shared
|
||||||
.on_stop
|
.on_stop
|
||||||
.send(OnStop::Sleep)
|
.send(OnStop::Sleep)
|
||||||
|
|||||||
Reference in New Issue
Block a user