Skip to content
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

Using multiprocessing with a pool size option #14

Merged
merged 1 commit into from
Oct 30, 2015

Conversation

adityanatraj
Copy link
Collaborator

This allows one to set a pool size that the Vlad Classes will get distributed over to get validated. After all the classes are vladiated, the vladiation success is combined to allow the exit code to be used in other scripts.


vladfile = find_vladfile(options.vladfile)
if not vladfile:
logger.error(
"Could not find any vladfile! Ensure file ends in '.py' and see --help for available options.")
sys.exit(1)
return EXIT_SUCCESS
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be a failure, not a success.

@di
Copy link
Owner

di commented Oct 30, 2015

Thanks for doing this! Can you add some documentation for this feature to the README as well?

@adityanatraj adityanatraj force-pushed the multiprocesses branch 3 times, most recently from fd53c44 to dfefcae Compare October 30, 2015 16:30
@adityanatraj
Copy link
Collaborator Author

updated!

I wasn't sure the best way to reveal the feature in the README so i just noted it up top.

There doesn't appear to be a clear section dedicated to command-line usage; what do you think?

@di
Copy link
Owner

di commented Oct 30, 2015

Hmm, good point. It probably deserves it's own "Command Line Args" section instead which can sit before the "Testing" section, "Features" is a little more high-level.

It's OK if it's just the one flag for now, I made #15 to eventually document the rest.

**Validate multiple files in parallel with multiprocessing**
specify `-p <number_of_processes>` or `--processes <number_of_processes>` to
parallelize across up to that many processes.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add the default value to the docs as well?

@adityanatraj
Copy link
Collaborator Author

updated with default value in readme

@di di closed this Oct 30, 2015
@di di reopened this Oct 30, 2015
**Validate multiple files in parallel with multiprocessing**
specify `-p <number_of_processes>` or `--processes <number_of_processes>` to
parallelize across up to that many processes. (it defaults to 1 when unspecified)

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah sorry, I was unclear. Can you move this into it's own section "Command Line Args" after the "Testing" section?

@adityanatraj adityanatraj force-pushed the multiprocesses branch 2 times, most recently from d3efbf2 to 11be216 Compare October 30, 2015 20:58
@adityanatraj
Copy link
Collaborator Author

retry :)

@di
Copy link
Owner

di commented Oct 30, 2015

👍 !!!

adityanatraj pushed a commit that referenced this pull request Oct 30, 2015
Using multiprocessing with a pool size option
@adityanatraj adityanatraj merged commit cf7f632 into di:master Oct 30, 2015
@di di mentioned this pull request Jan 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants