-
Couldn't load subscription status.
- Fork 24
Common: check_expired_locked_rules use SQLalchemy #160
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
base: master
Are you sure you want to change the base?
Conversation
da54b1f to
92ff4c5
Compare
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.
Please split your PR into multiple commits. You can take #138 as an example.
It may seem tedious for such a small and simple probe, but it’s a good habit, one that should be adopted early.
92ff4c5 to
8899df8
Compare
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.
You’re also porting the probe from Python 2 to Python 3, but that is not described in your commits. The changes to the shebang and the print statements should be split in a separate commit.
In case you’re not convinced by the usefulness of this, there was a print 'Locked expired rules' statement that you silently removed. It required effort from me to notice it; it would have been obvious if the changes had been split as recommended.
| status = CRITICAL | ||
| print row[0], row[1], row[2] | ||
| print(row[0], row[1], row[2]) | ||
|
|
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.
This blank line (and the similar one you introduced later) produces a curious grouping. According to PEP 8:
Use blank lines in functions, sparingly, to indicate logical sections.
A try and its associated except statements are typically part of the same section. It would make more sense to introduce a blank line before the second try statement and before the last sys.exit(status) call.
8899df8 to
ec4b89b
Compare
Address part of #127 - Update without Prometheus