feat: add common queue
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
@@ -4,12 +4,20 @@ use refresh::AgentRefresh;
|
||||
|
||||
pub use config::setup_config;
|
||||
|
||||
pub mod models;
|
||||
|
||||
mod agent_state;
|
||||
mod config;
|
||||
mod discovery_client;
|
||||
mod event_handler;
|
||||
mod grpc_client;
|
||||
mod queue;
|
||||
mod refresh;
|
||||
mod scheduler;
|
||||
|
||||
mod handlers;
|
||||
|
||||
mod actions;
|
||||
|
||||
pub async fn execute() -> anyhow::Result<()> {
|
||||
let state = AgentState::new().await?;
|
||||
@@ -17,6 +25,7 @@ pub async fn execute() -> anyhow::Result<()> {
|
||||
notmad::Mad::builder()
|
||||
.add(AgentRefresh::new(&state))
|
||||
.add(EventHandler::new(&state))
|
||||
.add(state.queue.clone())
|
||||
.cancellation(Some(std::time::Duration::from_secs(2)))
|
||||
.run()
|
||||
.await?;
|
||||
|
Reference in New Issue
Block a user