Skip to content

Commit

Permalink
LocalRunner: use all available cores, fix redmod-team#29
Browse files Browse the repository at this point in the history
  • Loading branch information
Rykath committed May 15, 2021
1 parent 06ded1d commit ad5330e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions profit/run/default.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,12 @@ def check_runs(self, poll=False):
def handle_config(cls, config, base_config):
"""
class: local
parallel: 1 # maximum number of simultaneous runs (for spawn array)
parallel: all # maximum number of simultaneous runs (for spawn array)
sleep: 0 # number of seconds to sleep while polling
fork: true # whether to spawn the (non-custom) worker via forking instead of a subprocess (via a shell)
"""
if 'parallel' not in config:
config['parallel'] = 1
if 'parallel' not in config or config['parallel'] == 'all':
config['parallel'] = os.cpu_count()
if 'sleep' not in config:
config['sleep'] = 0
if 'fork' not in config:
Expand Down

0 comments on commit ad5330e

Please sign in to comment.