feat: add common queue
All checks were successful
continuous-integration/drone/push Build is passing

Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
2024-11-24 21:08:37 +01:00
parent ee323e99e8
commit ea5adb2f93
15 changed files with 271 additions and 85 deletions

View File

@@ -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?;