changed NET_STACK_SIZE & WEB_TASK_SIZE

This commit is contained in:
2025-10-07 22:48:17 +02:00
parent 082f1faba9
commit 92c7fec283
2 changed files with 8 additions and 4 deletions

View File

@@ -8,7 +8,6 @@ use static_cell::make_static;
use crate::{
UsedStore,
init::network::NETWORK_STACK_SIZE,
webserver::app::{AppProps, AppState},
};
@@ -17,6 +16,8 @@ mod assets;
mod api;
mod app;
pub const WEB_TAKS_SIZE: usize = 3; // Up this number if request start fail with Timeouts.
pub fn start_webserver(
spawner: &mut Spawner,
stack: Stack<'static>,
@@ -33,12 +34,12 @@ pub fn start_webserver(
write: Some(Duration::from_secs(5)),
}));
for task_id in 0..NETWORK_STACK_SIZE {
for task_id in 0..WEB_TAKS_SIZE {
spawner.must_spawn(webserver_task(task_id, stack, app, config, state));
}
}
#[embassy_executor::task(pool_size = NETWORK_STACK_SIZE)]
#[embassy_executor::task(pool_size = WEB_TAKS_SIZE)]
async fn webserver_task(
task_id: usize,
stack: embassy_net::Stack<'static>,