-
Notifications
You must be signed in to change notification settings - Fork 2
234 add threading to run parser function #235
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
base: main
Are you sure you want to change the base?
Conversation
JosePizarro3
left a comment
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.
left some comments
I still want to test out myself, so before merging let me go through it pls
bam_masterdata/cli/run_parser.py
Outdated
| timeout (int, optional): Time in seconds for the parser to complete before timing out. Defaults to 300. | ||
| max_workers (int, optional): Number of threads to use. Defaults to 1. | ||
| """ | ||
| with ThreadPoolExecutor(max_workers) as executor: |
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.
you should probably add the initial checks that also happen in run_parser(), for consistency.
Alternatively, we could create a class RunParser() with an __init__ accepting the inputs, and two distinct functions: one for running the parser, and another for the threading
Pull Request Test Coverage Report for Build 20276964836Details
💛 - Coveralls |
dfb60b2 to
ed60b66
Compare
Simple thread function for run_parser
Closes #234