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

expired locked rules probe ported to SQLAlchemy #46

Closed

Conversation

FernandoGarzon
Copy link
Contributor

No description provided.

Copy link
Contributor

@ericvaandering ericvaandering left a 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

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))
Copy link
Contributor

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.

Copy link
Contributor Author

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?

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,
Copy link
Contributor

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

status = CRITICAL
print row[0], row[1], row[2], row[3]
id = unicode(row[0])
print(id, row[1], row[2], row[3])
Copy link
Contributor

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.

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

Copy link
Contributor

@ericvaandering ericvaandering left a 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

@dchristidis
Copy link
Contributor

Closing in favour of #133.

@dchristidis dchristidis closed this Aug 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants