forked from github-starred/komodo
implement cancel build
This commit is contained in:
@@ -42,6 +42,10 @@ impl Update {
|
||||
self.logs.push(Log::error(stage, msg));
|
||||
}
|
||||
|
||||
pub fn in_progress(&mut self) {
|
||||
self.status = UpdateStatus::InProgress;
|
||||
}
|
||||
|
||||
pub fn finalize(&mut self) {
|
||||
self.success = all_logs_success(&self.logs);
|
||||
self.end_ts = Some(monitor_timestamp());
|
||||
|
||||
@@ -12,3 +12,16 @@ use crate::entities::update::Update;
|
||||
pub struct RunBuild {
|
||||
pub build_id: String,
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[response(CancelBuildResponse)]
|
||||
pub struct CancelBuild {
|
||||
pub build_id: String,
|
||||
}
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone)]
|
||||
pub struct CancelBuildResponse {}
|
||||
|
||||
Reference in New Issue
Block a user