mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 12:11:56 +00:00
misc fixes (#2892)
* use docker for build steps that require linux when not on linux * use fuse for overlay * quiet mountpoint * node 22 * misc fixes * make shasum more compliant * optimize download-base-image.sh with cleaner url handling and checksum verification * fix script * fixes #2900 * bump node and npm versions in web readme * Minor pl.ts fixes * fixes in response to synapse issues * beta.8 * update ts-matches * beta.11 * pl.ts finetuning --------- Co-authored-by: Mariusz Kogen <k0gen@pm.me> Co-authored-by: Matt Hill <mattnine@protonmail.com>
This commit is contained in:
@@ -41,7 +41,7 @@ impl Context for ContainerCliContext {
|
||||
.runtime
|
||||
.get_or_init(|| {
|
||||
Arc::new(
|
||||
tokio::runtime::Builder::new_current_thread()
|
||||
tokio::runtime::Builder::new_multi_thread()
|
||||
.enable_all()
|
||||
.build()
|
||||
.unwrap(),
|
||||
|
||||
@@ -5,8 +5,22 @@ use models::{FromStrParser, PackageId};
|
||||
|
||||
use crate::service::effects::prelude::*;
|
||||
use crate::service::rpc::CallbackId;
|
||||
use crate::service::RebuildParams;
|
||||
use crate::status::MainStatus;
|
||||
|
||||
pub async fn rebuild(context: EffectContext) -> Result<(), Error> {
|
||||
let seed = context.deref()?.seed.clone();
|
||||
let ctx = seed.ctx.clone();
|
||||
let id = seed.id.clone();
|
||||
drop(seed);
|
||||
tokio::spawn(async move {
|
||||
super::super::rebuild(ctx, RebuildParams { id })
|
||||
.await
|
||||
.log_err()
|
||||
});
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub async fn restart(
|
||||
context: EffectContext,
|
||||
ProcedureId { procedure_id }: ProcedureId,
|
||||
|
||||
@@ -34,6 +34,12 @@ pub fn handler<C: Context>() -> ParentHandler<C> {
|
||||
from_fn(callbacks::clear_callbacks).no_cli(),
|
||||
)
|
||||
// control
|
||||
.subcommand(
|
||||
"rebuild",
|
||||
from_fn_async(control::rebuild)
|
||||
.no_display()
|
||||
.with_call_remote::<ContainerCliContext>(),
|
||||
)
|
||||
.subcommand(
|
||||
"restart",
|
||||
from_fn_async(control::restart)
|
||||
|
||||
@@ -209,7 +209,10 @@ impl ServiceRef {
|
||||
.request(rpc::Exit, Empty {})
|
||||
.await?;
|
||||
shutdown.shutdown();
|
||||
hdl.await.with_kind(ErrorKind::Cancelled)?;
|
||||
tokio::time::timeout(Duration::from_secs(30), hdl)
|
||||
.await
|
||||
.with_kind(ErrorKind::Timeout)?
|
||||
.with_kind(ErrorKind::Cancelled)?;
|
||||
}
|
||||
let service = Arc::try_unwrap(self.0).map_err(|_| {
|
||||
Error::new(
|
||||
@@ -482,7 +485,11 @@ impl Service {
|
||||
None,
|
||||
) // TODO timeout
|
||||
.await
|
||||
.with_kind(ErrorKind::MigrationFailed)?; // TODO: handle cancellation
|
||||
.with_kind(if src_version.is_some() {
|
||||
ErrorKind::UpdateFailed
|
||||
} else {
|
||||
ErrorKind::InstallFailed
|
||||
})?; // TODO: handle cancellation
|
||||
|
||||
if let Some(mut progress) = progress {
|
||||
progress.finalization_progress.complete();
|
||||
|
||||
Reference in New Issue
Block a user