-
Notifications
You must be signed in to change notification settings - Fork 67
bring loggers in sync and add multiproc capabilities #1254
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
Conversation
paired PR: cmu-delphi/covidcast-indicators#1885 |
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.
Looks nice, but seems to have formatting issues, everything above line 128 has 4 spaces/tab and everything below has 2 spaces
old habits die hard... fixed that in the other PR and will copy it here shortly |
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.
👍
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.
👍
68be38c
to
e8d0bb1
Compare
Kudos, SonarCloud Quality Gate passed!
|
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.
👍
* Performance testing testing workflow (#1253) * New CTIS publication (#1255) * Newer CTIS publication * bring loggers in sync and add multiproc capabilities (#1254) * add syntax feature documentation (#1256) * Newest CTIS publication * chore: sync to www-covidcast release v3.2.7 * moving quidel signals to non-public access (#1261) with integration tests! --------- Co-authored-by: Dmytro Trotsko <[email protected]> * chore: release delphi-epidata 4.1.8 --------- Co-authored-by: Dmytro Trotsko <[email protected]> Co-authored-by: Rostyslav Zatserkovnyi <[email protected]> Co-authored-by: Alex Reinhart <[email protected]> Co-authored-by: nmdefries <[email protected]> Co-authored-by: melange396 <[email protected]> Co-authored-by: minhkhul <[email protected]> Co-authored-by: minhkhul <[email protected]> Co-authored-by: melange396 <[email protected]>
this does a few things, including:
bringing the
logger.py
files from https://github.com/cmu-delphi/delphi-epidata/ and https://github.com/cmu-delphi/covidcast-indicators/ back in sync. (there will be equivalent PRs in both repositories.)larger functional differences are now applied to both:
covidcast-indicators
didnt log PIDsdelphi-epidata
didnt always respect output filenames properly (though it seems we didnt actually trigger this in practice; look at the collapsible section below for how to see this for yourself).differentiated the uncaught exception handlers a bit
added multiprocess-safe logging constructs, which should be helpful in Add multiprocessing to the Quidel indicator covidcast-indicators#1881 and in the future. (see collapsible section below for sample usage)
to reproduce bad outfile behavior:
python3
interpreter, check those files, and repeat:two example usages of multiprocessing-compatible logger:
multiprocessing
directly, requires explicit termination of the LoggerThread (after ensuring the pool jobs have completed), and requires thesublogger
to be instantiated before the worker and bound in an accessible scope (it must be used as though it is local to the worker, it cannot be passed as an argument to pool methods)