Skip to content

expired locked rules probe ported to SQLAlchemy#46

Closed
FernandoGarzon wants to merge 1 commit intorucio:masterfrom
FernandoGarzon:expired_locked_rules_PROBE
Closed

expired locked rules probe ported to SQLAlchemy#46
FernandoGarzon wants to merge 1 commit intorucio:masterfrom
FernandoGarzon:expired_locked_rules_PROBE

Conversation

@FernandoGarzon
Copy link
Contributor

No description provided.

@FernandoGarzon FernandoGarzon force-pushed the expired_locked_rules_PROBE branch from 021cbc0 to 667561d Compare February 12, 2021 22:14
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