add id getter for message body
This commit is contained in:
@@ -19,7 +19,7 @@ impl CheckHandler {
|
||||
impl Handler for CheckHandler {
|
||||
fn handle(&self, res: Result<Message, String>) {
|
||||
match res {
|
||||
Ok(_m) => todo!(),
|
||||
Ok(_m) => (),
|
||||
Err(_e) => todo!(),
|
||||
}
|
||||
}
|
||||
@@ -36,12 +36,15 @@ impl DeployHandler {
|
||||
|
||||
fn manage_message(&self, message: Message) {
|
||||
match message {
|
||||
Message::CheckDeploy(_body) => {
|
||||
Message::CheckDeploy(body) => {
|
||||
let guard = self.sender.lock().unwrap();
|
||||
if let Err(e) = guard.send(Job::new(1, JobAction::MegaportCheckDeploy)) {
|
||||
let id: i32 = body.get_id().try_into().unwrap();
|
||||
|
||||
if let Err(e) = guard.send(Job::new(id, JobAction::MegaportCheckDeploy)) {
|
||||
println!("[handler(deploy)] error: {}", e);
|
||||
}
|
||||
}
|
||||
Message::StopManager => todo!(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user