mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-04-04 14:29:45 +00:00
feature: pack s9pk (#2642)
* TODO: images * wip * pack s9pk images * include path in packsource error * debug info * add cmd as context to invoke * filehelper bugfix * fix file helper * fix exposeForDependents * misc fixes * force image removal * fix filtering * fix deadlock * fix api * chore: Up the version of the package.json * always allow concurrency within same call stack * Update core/startos/src/s9pk/merkle_archive/expected.rs Co-authored-by: Jade <2364004+Blu-J@users.noreply.github.com> --------- Co-authored-by: J H <dragondef@gmail.com> Co-authored-by: Jade <2364004+Blu-J@users.noreply.github.com>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
use crate::prelude::*;
|
||||
use crate::rpc_continuations::Guid;
|
||||
use crate::service::config::GetConfig;
|
||||
use crate::service::dependencies::DependencyConfig;
|
||||
use crate::service::start_stop::StartStop;
|
||||
@@ -15,7 +16,7 @@ impl Handler<Start> for ServiceActor {
|
||||
.except::<GetConfig>()
|
||||
.except::<DependencyConfig>()
|
||||
}
|
||||
async fn handle(&mut self, _: Start, _: &BackgroundJobQueue) -> Self::Response {
|
||||
async fn handle(&mut self, _: Guid, _: Start, _: &BackgroundJobQueue) -> Self::Response {
|
||||
self.0.persistent_container.state.send_modify(|x| {
|
||||
x.desired_state = StartStop::Start;
|
||||
});
|
||||
@@ -23,8 +24,8 @@ impl Handler<Start> for ServiceActor {
|
||||
}
|
||||
}
|
||||
impl Service {
|
||||
pub async fn start(&self) -> Result<(), Error> {
|
||||
self.actor.send(Start).await
|
||||
pub async fn start(&self, id: Guid) -> Result<(), Error> {
|
||||
self.actor.send(id, Start).await
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,7 +37,7 @@ impl Handler<Stop> for ServiceActor {
|
||||
.except::<GetConfig>()
|
||||
.except::<DependencyConfig>()
|
||||
}
|
||||
async fn handle(&mut self, _: Stop, _: &BackgroundJobQueue) -> Self::Response {
|
||||
async fn handle(&mut self, _: Guid, _: Stop, _: &BackgroundJobQueue) -> Self::Response {
|
||||
let mut transition_state = None;
|
||||
self.0.persistent_container.state.send_modify(|x| {
|
||||
x.desired_state = StartStop::Stop;
|
||||
@@ -51,7 +52,7 @@ impl Handler<Stop> for ServiceActor {
|
||||
}
|
||||
}
|
||||
impl Service {
|
||||
pub async fn stop(&self) -> Result<(), Error> {
|
||||
self.actor.send(Stop).await
|
||||
pub async fn stop(&self, id: Guid) -> Result<(), Error> {
|
||||
self.actor.send(id, Stop).await
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user