Fix: remove agent from pool immediately on completion and add Matrix bot user allowlist
This commit is contained in:
@@ -127,20 +127,6 @@ async fn main() -> Result<(), std::io::Error> {
|
||||
|
||||
let app = build_routes(ctx);
|
||||
|
||||
// Background reaper: periodically remove completed/failed agent entries
|
||||
// that have exceeded the TTL.
|
||||
{
|
||||
let reaper_agents = Arc::clone(&startup_agents);
|
||||
let ttl = std::time::Duration::from_secs(agents::DEFAULT_AGENT_TTL_SECS);
|
||||
tokio::spawn(async move {
|
||||
// Check every 5 minutes.
|
||||
let interval = std::time::Duration::from_secs(300);
|
||||
loop {
|
||||
tokio::time::sleep(interval).await;
|
||||
reaper_agents.reap_expired_agents(ttl);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Optional Matrix bot: connect to the homeserver and start listening for
|
||||
// messages if `.story_kit/bot.toml` is present and enabled.
|
||||
|
||||
Reference in New Issue
Block a user