Skip to content
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

Store hash before decoding, do not parse broken file twice #118

Merged
merged 1 commit into from
Mar 1, 2024

Conversation

ties
Copy link
Collaborator

@ties ties commented Feb 29, 2024

Tiny tweak. My previous interpretation (but have not tested it) is that a SLURM or JSON file that fails to parse will be parsed every time.

  • log when slurm file is updated
  • prevent parsing of file which we already know is broken

Trivial change. Prevents a series of "updating from x to y" when y is in fact not parseable.

Copy link
Contributor

@cjeker cjeker left a comment

Choose a reason for hiding this comment

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

Looks good. Could you also change the log message from info to debug?

cmd/stayrtr/stayrtr.go Show resolved Hide resolved
cmd/stayrtr/stayrtr.go Show resolved Hide resolved
@ties ties force-pushed the only-parse-broken-file-once branch from 460d315 to 4c1c8fa Compare March 1, 2024 10:45
@ties
Copy link
Collaborator Author

ties commented Mar 1, 2024

Tested locally. Inconclusive results because -checktime is broken and I have static test files.

@ties ties merged commit 8adf6b5 into bgp:master Mar 1, 2024
3 checks passed
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.

2 participants