Skip to content

feat: read monitors from config file#19

Merged
Mivik merged 4 commits intoTeamFlos:mainfrom
ChickenPige0n:main
Feb 4, 2025
Merged

feat: read monitors from config file#19
Mivik merged 4 commits intoTeamFlos:mainfrom
ChickenPige0n:main

Conversation

@ChickenPige0n
Copy link
Copy Markdown
Member

avoid unnecessary cost when changing monitors.

@Mivik Mivik merged commit 4b54963 into TeamFlos:main Feb 4, 2025
Comment on lines +120 to +123
let config: ServerConfig = File::open("server_config.yml")
.ok()
.and_then(|f| serde_yaml::from_reader(f).ok())
.unwrap_or_default();
Copy link
Copy Markdown
Contributor

@YuevUwU YuevUwU Feb 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: Ignore Too Broad Errors
io::Error and serde_yaml::Error are ignored without any message, and then rollback to use the default vec![2].
This will cause allowed users other than Mivik to inexplicably find themselves unable to monitor when attempting to monitor the system.

Fix: #43

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants