-
Notifications
You must be signed in to change notification settings - Fork 192
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
cli: notify users of runner usage #4663
Conversation
Not sure why the tests failed... didn't change docs + this should not be backend-specific behavior |
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.
Thanks @ltalirz . Fine by me, would just not add the case where daemon is not running as that is already covered in verdi process list
itself.
afcbc32
to
797b7c9
Compare
Thanks - I've pulled out that check from the previous function and now call the worker query only when needed. |
797b7c9
to
44e23cf
Compare
@@ -323,11 +323,9 @@ Below is a list with all available subcommands. | |||
.aiida extension for these HTTP addresses. Automatically | |||
discovered archive URLs will be downloaded and added to | |||
ARCHIVES for importing |
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.
Note: I first removed these changes again but then noticed that they also appear on the CI pre-commit check - some updated version perhaps?
44e23cf
to
b64a4b2
Compare
@sphuber Now that the print is gone when no daemon is running (which I think is the right thing to do here), the test checking its output fails. What do you think is the best approach here - fake a running daemon or move this test to the daemon tests? with open(get_daemon_client().circus_port_file, 'w', encoding='utf8') as fhandle:
fhandle.write(123)
test.. Perhaps there are cleaner approaches |
b64a4b2
to
3debe12
Compare
The extra query performed in `verdi process list` to get the load on the daemon runners is slow - and usually results in no output for the user in case that the load is below the threshold. With this change, the load is shown even when below the threshold. Furthermore, the query is only performed if the daemon is running and skipped otherwise.
3debe12
to
c5f0a6c
Compare
The typical way is to simply monkeypatch the |
Codecov Report
@@ Coverage Diff @@
## develop #4663 +/- ##
===========================================
- Coverage 80.47% 80.47% -0.00%
===========================================
Files 530 531 +1
Lines 36944 36950 +6
===========================================
+ Hits 29727 29731 +4
- Misses 7217 7219 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
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.
thanks @sphuber !
The extra query performed in
verdi process list
to get the load on thedaemon runners is slow - and usually results in no output for the user.
This PR at least lets the user know what is being queried (which also may be useful
to monitor runner load).