-
Notifications
You must be signed in to change notification settings - Fork 7
Common function #61
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: main
Are you sure you want to change the base?
Common function #61
Conversation
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.
And squash this next commit in with the previous two (so after your merge of main into your code).
|
|
||
| def produce_prom_metric(metric_name, metric_value, list_input, labels): | ||
| # loop over labels to get key,value pairs | ||
| # print(len(labels)) |
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.
Let's get rid of all these old print statements.
| print('}', end='') | ||
| print(f' {metric_value}') | ||
| extract_labels = ['vo', 'tapepool', 'vid', 'status'] | ||
|
|
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.
remove one of the blank lines
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.
Or all of them. You decide the style, but multiple blank lines is reserved for separating one function/class from another.
|
|
||
| cta_admin_output_json = json.loads(cta_admin_output) | ||
|
|
||
|
|
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.
Take this one out
9707357 to
d58b2cb
Compare
Adding a common.py file with function that is common to all files. Removing shell=True from files. Adding quotations. All code was run and is working.