-
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 wait logs "clearing all items from cache" every 2 seconds #1029
Comments
That message is only shown if there is an explicit call to
Logging configThere is probably a call to logging.getLogger('requests_cache').setLevel('ERROR') Cache expirationAs for whatever is calling
Depending on how long you want cached items to persist. If you or someone else can describe the caching behavior you want, I can provide some examples. |
Thanks for the help @JWCook !
Yes this is what we have done in other instances and what I was planning to do here. I quite like having the logs from other libraries in the verbose log as it helps for debugging sometimes. The cache expiration thing is trickier - for some (most?) API calls we want the cache to be pretty long as it speeds up execution significantly. However there are some calls which should always fetch fresh data. I suspect that we are clearing the entire cache in these cases when we should instead be instead using Checking the code now I suspect that there is actually only one instance in the code where this is set up incorrectly, here: Lines 327 to 328 in d0a6649
The one in the sync code is a bit of a special case and I think it is probably safer to wipe the entire cache there. |
This is better as we don't lose the cache from other calls, but we do still get fresh data from the website poll. As a side-effect, we lose the INFO log messages which closes nf-core#1029
Description of the bug
This also breaks the loading spinner animation.
Steps to reproduce
use either
nf-core launch
ornf-core schema build
Expected behaviour
This shouldn't be logged at all
System
Nextflow Installation
Additional context
Probably due to a change of the default logging level of the requests_cache package. Downgrading it to 0.5.2 removes the problem. This should have been fixed since 0.6.1 (nf-core/smrnaseq#74 (comment)), but I still got the error using 0.6.2. Adding
log.setLevel(logging.DEBUG)
in utils.py, schema.py or launch.py, didn't resolve this problem.The text was updated successfully, but these errors were encountered: