impl notification + add Rocket endpoints
This commit is contained in:
+4
-2
@@ -1,10 +1,12 @@
|
||||
use std::{thread, time};
|
||||
|
||||
use rocket::serde::Serialize;
|
||||
|
||||
use super::{Runner, RunnerStatus, Storer};
|
||||
use crate::error::{MessageError, RunnerError, StorerError};
|
||||
use crate::message::{Message, Subject};
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq)]
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Serialize)]
|
||||
pub enum JobAction {
|
||||
Deploy,
|
||||
Check,
|
||||
@@ -34,7 +36,7 @@ impl Job {
|
||||
self.set_status(RunnerStatus::Running);
|
||||
println!("{} {}", self.format_job(), "deploying...");
|
||||
|
||||
let wait = time::Duration::from_millis(5);
|
||||
let wait = time::Duration::from_secs(5);
|
||||
thread::sleep(wait);
|
||||
|
||||
self.set_status(RunnerStatus::Success);
|
||||
|
||||
Reference in New Issue
Block a user