Closed kwaa closed 4 months ago
The recent updates involve a significant refactoring of the project's dependencies and code structure. Key libraries related to asynchronous scheduling and graceful shutdown, particularly from the Tokio ecosystem, have been removed, streamlining the dependency list. New mechanisms for handling shutdown signals have been introduced, enhancing the applicationβs robustness. Overall, these changes simplify the architecture, focusing on core functionalities while maintaining asynchronous capabilities.
Files | Change Summary |
---|---|
Cargo.toml , README.md , crates/backend/Cargo.toml |
Removed dependencies: tokio-cron-scheduler , tokio-graceful-shutdown , async-trait . Streamlined the dependency list. |
crates/backend/src/lib.rs |
Removed IntoSubsystem implementation for Server . Introduced a new run function to simplify execution. |
crates/cron/Cargo.toml , crates/cron/src/lib.rs |
Commented out removed dependencies and modified the run function to handle shutdown signals differently. |
crates/utils/Cargo.toml |
Added tokio dependency to enable asynchronous programming capabilities. |
crates/utils/src/graceful_shutdown.rs , crates/utils/src/lib.rs |
Added shutdown_signal function for graceful shutdown handling; exported it from the library. |
src/main.rs |
Refactored main function to simplify subsystem management, removing the cron subsystem. |
sequenceDiagram
participant U as User
participant M as Main Function
participant S as Server
participant G as Graceful Shutdown
U->>M: Start Application
M->>S: Initialize Server
M->>G: Setup Shutdown Signal Handling
S->>M: Run Server
U->>G: Send Shutdown Signal
G->>S: Initiate Shutdown Process
S->>G: Complete Shutdown
πβ¨
In the code where rabbits hop,
Dependencies trimmed, we won't stop!
With signals to guide our way,
A graceful exit at the end of the day.
Simplified paths, clean and bright,
We dance in the code, everything feels right!
πΌπ₯
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Summary by CodeRabbit
New Features
Refactor
Bug Fixes
Documentation