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 Dec 5, 2022
1 parent d877864 commit 031b646
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 @@ -40,7 +40,7 @@ def _run(plugin):

connections.close_all()

with ThreadPoolExecutor(max_workers=len(self.plugins) or 1) as executor:
with ThreadPoolExecutor() as executor:
for plugin in executor.map(_run, self.plugins):
if plugin.critical_service:
if not HEALTH_CHECK["WARNINGS_AS_ERRORS"]:
Expand Down

0 comments on commit 031b646

Please sign in to comment.