Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
parent
ea5adb2f93
commit
6647bb89be
@ -3,12 +3,8 @@ use std::{ops::Deref, sync::Arc};
|
|||||||
use crate::api::Discovery;
|
use crate::api::Discovery;
|
||||||
|
|
||||||
use super::{
|
use super::{
|
||||||
config::AgentConfig,
|
config::AgentConfig, discovery_client::DiscoveryClient, grpc_client::GrpcClient,
|
||||||
discovery_client::DiscoveryClient,
|
handlers::scheduled_tasks::ScheduledTasks, queue::AgentQueue, scheduler::Scheduler,
|
||||||
grpc_client::GrpcClient,
|
|
||||||
handlers::scheduled_tasks::{self, ScheduledTasks},
|
|
||||||
queue::AgentQueue,
|
|
||||||
scheduler::Scheduler,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
|
@ -14,6 +14,8 @@ impl ScheduledTasks {
|
|||||||
task: &str,
|
task: &str,
|
||||||
_properties: BTreeMap<String, String>,
|
_properties: BTreeMap<String, String>,
|
||||||
) -> anyhow::Result<()> {
|
) -> anyhow::Result<()> {
|
||||||
|
tracing::info!("scheduling: {}", task);
|
||||||
|
|
||||||
// Get plan
|
// Get plan
|
||||||
let plan = Plan::new();
|
let plan = Plan::new();
|
||||||
let tasks = plan.tasks().await?;
|
let tasks = plan.tasks().await?;
|
||||||
|
@ -3,7 +3,7 @@ use std::sync::Arc;
|
|||||||
use notmad::{Component, MadError};
|
use notmad::{Component, MadError};
|
||||||
use tokio::sync::Mutex;
|
use tokio::sync::Mutex;
|
||||||
|
|
||||||
use super::{handlers::scheduled_tasks::ScheduledTasks, models::Commands, scheduler::Scheduler};
|
use super::{models::Commands, scheduler::Scheduler};
|
||||||
|
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
pub struct AgentQueue {
|
pub struct AgentQueue {
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
use std::collections::BTreeMap;
|
use std::collections::BTreeMap;
|
||||||
|
|
||||||
use anyhow::Context;
|
|
||||||
|
|
||||||
use crate::agent::models::Commands;
|
use crate::agent::models::Commands;
|
||||||
|
|
||||||
use super::{agent_state::AgentState, queue::AgentQueue};
|
use super::{agent_state::AgentState, queue::AgentQueue};
|
||||||
|
Loading…
Reference in New Issue
Block a user