huskies: merge 1039
This commit is contained in:
+14
-1
@@ -283,6 +283,16 @@ async fn main() -> Result<(), std::io::Error> {
|
||||
let timer_store_for_tick = Arc::clone(&timer_store);
|
||||
let timer_store_for_bot = Arc::clone(&timer_store);
|
||||
|
||||
// Generic scheduled-timer store for the `schedule_timer` MCP tool.
|
||||
let scheduled_timer_store =
|
||||
std::sync::Arc::new(crate::service::timer::ScheduledTimerStore::load(
|
||||
startup_root
|
||||
.as_ref()
|
||||
.map(|r| r.join(".huskies").join("scheduled_timers.json"))
|
||||
.unwrap_or_else(|| std::path::PathBuf::from("/tmp/huskies-scheduled-timers.json")),
|
||||
));
|
||||
let scheduled_timer_store_for_tick = Arc::clone(&scheduled_timer_store);
|
||||
|
||||
let ctx = AppContext {
|
||||
state: app_state,
|
||||
store,
|
||||
@@ -295,6 +305,7 @@ async fn main() -> Result<(), std::io::Error> {
|
||||
bot_shutdown: bot_ctxs.shutdown_notifier.clone(),
|
||||
matrix_shutdown_tx: Some(Arc::clone(&bot_ctxs.matrix_shutdown_tx)),
|
||||
timer_store,
|
||||
scheduled_timer_store,
|
||||
};
|
||||
|
||||
// Per-project event buffer for the gateway's `/api/events` poller.
|
||||
@@ -305,7 +316,7 @@ async fn main() -> Result<(), std::io::Error> {
|
||||
startup::tick_loop::spawn_gateway_relay(&startup_root, Arc::clone(&services.status));
|
||||
|
||||
let app = build_routes(
|
||||
ctx,
|
||||
ctx.clone(),
|
||||
bot_ctxs.whatsapp_ctx.clone(),
|
||||
bot_ctxs.slack_ctx.clone(),
|
||||
port,
|
||||
@@ -316,7 +327,9 @@ async fn main() -> Result<(), std::io::Error> {
|
||||
startup::tick_loop::spawn_tick_loop(
|
||||
Arc::clone(&startup_agents),
|
||||
timer_store_for_tick,
|
||||
scheduled_timer_store_for_tick,
|
||||
startup_root.clone(),
|
||||
ctx,
|
||||
);
|
||||
|
||||
// Optional Matrix bot.
|
||||
|
||||
Reference in New Issue
Block a user