-
Notifications
You must be signed in to change notification settings - Fork 24
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
expired locked rules probe ported to SQLAlchemy #46
expired locked rules probe ported to SQLAlchemy #46
Conversation
021cbc0
to
667561d
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.
@dchristidis asking for your review too since this is part of the common probes
common/check_expired_locked_rules
Outdated
for row in session.execute(query): | ||
print('Locked expired rules') | ||
query = (session.query(models.ReplicationRule.id, models.ReplicationRule.scope, | ||
models.ReplicationRule.name, models.ReplicationRule.rse_expression)) |
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 format that correctly. PyCharm does a nice job or just make sure the various "models" line up under each other and that the filters line up under session.
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.
Does it look better now?
common/check_expired_locked_rules
Outdated
print 'Datasets expired with locked rules' | ||
for row in session.execute(query): | ||
print('Datasets expired with locked rules') | ||
query = (session.query(models.ReplicationRule.id,models.ReplicationRule.scope, |
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.
Same thing. Format these nicely
common/check_expired_locked_rules
Outdated
status = CRITICAL | ||
print row[0], row[1], row[2], row[3] | ||
id = unicode(row[0]) | ||
print(id, row[1], row[2], row[3]) |
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.
@dchristidis do we gain anything by printing out the results of these queries? CMS is only using this to feed to monitoring, so we don't care about it.
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.
Printing is on the old probes, so I just copied that. Should I delete those? @dchristidis
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 see comments inline
bcecc72
to
2fc4118
Compare
Closing in favour of #133. |
No description provided.