Make DutiesChecker poll interval configurable via environment variable #30
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR makes the DutiesChecker service's poll interval configurable through the
DUTIES_CHECKER_POLL_INTERVAL_SECONDSenvironment variable, replacing the previously hardcoded 1-minute interval.Changes Made
PollIntervalSecondsfield to theConfigstruct ininternal/config/config_loader.goDUTIES_CHECKER_POLL_INTERVAL_SECONDSduring configuration loadingcmd/main.goto use the configuration value instead of the hardcoded1 * time.MinuteUsage
Error Handling
The implementation includes comprehensive error handling:
This change allows operators to tune the polling frequency based on their specific requirements without requiring code changes or rebuilds.
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
beacon-chain.hoodi.dncore.dappnode/tmp/go-build4097434652/b001/exe/main(dns block)/home/REDACTED/.cache/go-build/01/01f2aaded82f00bec7b66fc81586d51f4d845787dc59cf61fe2bf7624311008b-d/main(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
This pull request was created as a result of the following prompt from Copilot chat.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.