-
Notifications
You must be signed in to change notification settings - Fork 0
fix: remove WithSchedulerInterval and use hardcoded 24h interval #9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The scheduler interval is now fixed at 24 hours and no longer configurable. This prevents misconfiguration that could cause CPU overuse (e.g., setting interval to 0 or nanosecond values).
Reviewer's guide (collapsed on small PRs)Reviewer's GuideRemoves the configurable scheduler interval from the validator configuration and hardcodes the background scheduler to run at the package-level Class diagram for Config and Validator scheduler interval changesclassDiagram
class ConfigBefore {
string Root
time_Duration Interval
int FailLimit
bool ClassifyUA
}
class ConfigAfter {
string Root
int FailLimit
bool ClassifyUA
}
class ValidatorBefore {
string root
atomic_Pointer_bots bots
atomic_Pointer_uaIndex uaIndex
context_CancelFunc cancel
time_Duration interval
int failLimit
bool classifyUA
startScheduler(ctx context_Context)
}
class ValidatorAfter {
string root
atomic_Pointer_bots bots
atomic_Pointer_uaIndex uaIndex
context_CancelFunc cancel
int failLimit
bool classifyUA
startScheduler(ctx context_Context)
}
class Option {
apply(c *ConfigAfter)
}
class OptionsBefore {
WithRoot(dir string) Option
WithSchedulerInterval(interval time_Duration) Option
WithFailLimit(limit int) Option
}
class OptionsAfter {
WithRoot(dir string) Option
WithFailLimit(limit int) Option
}
ConfigBefore <|.. ConfigAfter
ValidatorBefore <|.. ValidatorAfter
Option <.. OptionsBefore
Option <.. OptionsAfter
ValidatorAfter ..> ConfigAfter
ValidatorBefore ..> ConfigBefore
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #9 +/- ##
==========================================
- Coverage 75.03% 74.84% -0.20%
==========================================
Files 14 14
Lines 645 640 -5
==========================================
- Hits 484 479 -5
Misses 117 117
Partials 44 44 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Benchmark Results |
Summary by Sourcery
Remove configurable scheduler interval in favor of a fixed 24h scheduler ticker and clean up related config, validator fields, and tests.
Enhancements: