From 0526dd7d8da8ba55a04defda191d2bba1313b6c2 Mon Sep 17 00:00:00 2001 From: mii443 Date: Thu, 10 Oct 2024 09:07:47 +0000 Subject: [PATCH] create ContaienrPool --- src/main.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main.rs b/src/main.rs index 7dfe291..ff65bb3 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,4 +1,5 @@ mod config; +mod container_pool; mod docker; mod event_handler; mod language; @@ -7,6 +8,7 @@ use std::{collections::HashSet, env, fs::File, io::Read, sync::Arc}; use config::Config; +use container_pool::ContainerPool; use event_handler::event_handler; use poise::{ serenity_prelude::{self as serenity, futures::lock::Mutex, UserId}, @@ -19,6 +21,7 @@ type Context<'a> = poise::Context<'a, Data, Error>; pub struct Data { pub config: Arc>, + pub container_pool: Arc>, } fn load_config() -> Option { @@ -54,6 +57,7 @@ async fn main() -> Result<(), ()> { Box::pin(async move { Ok(Data { config: Arc::new(Mutex::new(config)), + container_pool: Arc::new(Mutex::new(ContainerPool::new())), }) }) }