Skip to content

Commit

Permalink
simplification
Browse files Browse the repository at this point in the history
  • Loading branch information
pengyu-hou committed Feb 2, 2024
1 parent a66e080 commit 5dd6ced
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions api/py/ai/chronon/repo/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -491,13 +491,13 @@ def run(self):
additional_args=os.environ.get("CHRONON_CONFIG_ADDITIONAL_ARGS", ""),
)
command_list.append(command)
first_command = command_list.pop(0)
check_call(first_command)
if len(command_list) > 0:
if len(command_list) > 1:
# parallel backfill mode
with multiprocessing.Pool(processes=int(self.parallelism)) as pool:
logging.info("Running args list {} with pool size {}".format(command_list, self.parallelism))
pool.map(check_call, command_list)
elif len(command_list) == 1:
check_call(command_list[0])

def _gen_final_args(self, start_ds=None, end_ds=None):
base_args = MODE_ARGS[self.mode].format(
Expand Down

0 comments on commit 5dd6ced

Please sign in to comment.