Conversation
- **Config**: Implemented `CONFIG_CACHE` with 500ms throttling and async methods `enable_service_async`/`disable_service_async`. - **Users**: Implemented `USERS_CACHE` with 500ms throttling and async methods `add_user_async`, `delete_user_async`, etc., using `spawn_blocking` for CPU/IO tasks. - **Web Interface**: Refactored to use static async methods from `core`, removing local caches and `block_in_place`. - **Hardware**: Added `sys.refresh_disks()` to `detect()` for accurate disk stats. - **Project**: Bumped version to 1.0.8 and updated `README.md`.
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
This PR addresses the "Check. Fix. Optimize." task.
Changes:
Optimization (Caching & Async):
server_manager/src/core/config.rsandserver_manager/src/core/users.rsto use staticOnceLock<RwLock<Cached...>>caches.load_asyncmetadata checks to reduce I/O.add_user_async,enable_service_async, etc.) that offload blocking operations (file I/O, system user creation, hashing) totokio::task::spawn_blocking.server_manager/src/interface/web.rsto remove local caches andblock_in_place, utilizing the new thread-safe, efficient core methods.Fixes:
sys.refresh_disks()inHardwareInfo::detectto ensuring disk space usage is populated.UserManagerfor consistency between load and save.Documentation:
README.mdto reflect version 1.0.8.Cargo.tomlversion.Verification:
cargo test- All tests passed.cargo clippy- No warnings in project code.cargo check.PR created automatically by Jules for task 1266073415750486465 started by @Cylae