Skip to content

Commit

Permalink
Use default number of max_workers
Browse files Browse the repository at this point in the history
This allows Python to decide what the right number is, based on the number of CPU cores available.
  • Loading branch information
RealOrangeOne committed Oct 11, 2024
1 parent b0e2c4c commit 6e24fdd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion health_check/mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def _collect_errors(plugin):
_run(plugin)
_collect_errors(plugin)
else:
with ThreadPoolExecutor(max_workers=len(plugin_instances) or 1) as executor:
with ThreadPoolExecutor() as executor:
for plugin in executor.map(_run, plugin_instances):
_collect_errors(plugin)
return errors

0 comments on commit 6e24fdd

Please sign in to comment.