-
Notifications
You must be signed in to change notification settings - Fork 37
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
rest: simplify disk usage format #301
Conversation
86f6af5
to
45bdcd5
Compare
2257b8d
to
2233ff7
Compare
2233ff7
to
0294f67
Compare
Moderate:
Fails when we have users with no limits, the key doesn't exist, because we don't calculate the health. Works when users have limits set: $ flask reana-admin quota-usage
ID EMAIL CPU-USED CPU-LIMIT DISK-USED DISK-LIMIT
00000000-0000-0000-0000-000000000000 jdoe@example.org 89922 90000 1060 90000 |
To get this going I've changed the implementation so when there is no |
0294f67
to
b08e425
Compare
reana_server/reana_admin.py
Outdated
health_ordered = max( | ||
[disk.get("health"), cpu.get("health")], | ||
[disk.get("health", "healthy"), cpu.get("health", "healthy")], |
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.
Would it be ok to import it from the QuotaHealth
enum?
b08e425
to
5c4b6e5
Compare
* Shows disk usage format either in raw (bytes) or humand-friendly format (closes reanahub#296). * Remove unused marshmallow for openapi generation.
5c4b6e5
to
6c00f30
Compare
Codecov Report
@@ Coverage Diff @@
## master #301 +/- ##
=========================================
Coverage ? 50.80%
=========================================
Files ? 17
Lines ? 1374
Branches ? 0
=========================================
Hits ? 698
Misses ? 676
Partials ? 0 |
format (closes quotas: quota unit conversion server side #296).