-
Notifications
You must be signed in to change notification settings - Fork 324
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
Progress bar for storing process #398
Conversation
Thanks @varrialeciro this is wonderful - I'll take a look soon. A couple of things:
|
Yea, i didn't noticed that, thanks for clarifications. |
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.
Here is just a comment for @pieroit about future steps.
Is this is a good moment to think about moving notifications to a dedicated class or maybe it is an overkill?
core/cat/rabbit_hole.py
Outdated
@@ -125,17 +126,25 @@ def ingest_file( | |||
before_rabbithole_stores_documents | |||
""" | |||
|
|||
print("Start ingestion") |
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.
We have an utility to print stuff in the terminal. It would be much appreciated if you please could change this and further print
as follows:
from cat.log import log
log(text, "INFO")
there are many logging level available, but I think "INFO" is suitable for the purpose.
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.
Merging you can delete that print, were for debugging, I forgot to remove it.
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.
@varrialeciro yes take away the prints please, use log(message, "INFO")
:)
Also variables like perc100
and percResolution
shoud be snake_case (perc_100
, perc_resolution
)
Sorry for being picky, we have a lot going on in develop
and would like to merge this PR stright away ;)
Thank you for your patience
Thanks for reviewing @nicola-corbellini ! |
core/cat/rabbit_hole.py
Outdated
@@ -125,17 +126,25 @@ def ingest_file( | |||
before_rabbithole_stores_documents | |||
""" | |||
|
|||
print("Start ingestion") |
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.
@varrialeciro yes take away the prints please, use log(message, "INFO")
:)
Also variables like perc100
and percResolution
shoud be snake_case (perc_100
, perc_resolution
)
Sorry for being picky, we have a lot going on in develop
and would like to merge this PR stright away ;)
Thank you for your patience
Updated as you said, removed the debugging print and renamed in snake_case the variables. |
Hi @varrialeciro thank you for this, lots of people wanted a progress bar and this is a good move towards it. Welcome as a contributor :D Thanks also @nicola-corbellini for reviewing |
Description
Added a monitoring for percentage monitoring of storing process.
Using the notification list, every 10% of file ingestion, a notification is sent to the admin. The step resolution is variable with parameters "percResolution" that in my PR is set to 10. These are modification core side, the idea (with @Alwe help) could be to modify the admin adding a progress bar that change using the percentage received in the notification.
I opened a new PR because i don't know how can add these modification to the old PR. Sorry :/
Related to issue #(issue)
Type of change
Checklist: