remove rocket dependencies for manager notifications
This commit is contained in:
+1
-1
@@ -2,4 +2,4 @@ mod job;
|
||||
mod traits;
|
||||
|
||||
pub use job::{Job, JobAction};
|
||||
pub use traits::{Runner, RunnerStatus, Storer};
|
||||
pub use traits::{Notifier, Runner, RunnerStatus, Storer};
|
||||
|
||||
+5
-1
@@ -1,4 +1,4 @@
|
||||
use std::marker::Send;
|
||||
use std::marker::{Send, Sync};
|
||||
|
||||
use crate::error::{MessageError, RunnerError, StorerError};
|
||||
use crate::message::Message;
|
||||
@@ -19,6 +19,10 @@ pub trait Runner: Send + 'static {
|
||||
Self: Sized;
|
||||
}
|
||||
|
||||
pub trait Notifier: Sync + Send + 'static {
|
||||
fn send(&self, data: Message);
|
||||
}
|
||||
|
||||
pub trait Storer {
|
||||
fn insert(&self) -> Result<(), StorerError>;
|
||||
fn save(&self) -> Result<(), StorerError>;
|
||||
|
||||
Reference in New Issue
Block a user