I am attempting to run an async task and am getting an unexpected error: run_command() takes 1 positional argument but 318 were given. I have a list of commands that I want to run from a celery task.
run_command.chunks(iter(commands), 10).group().apply_async()
@task
def run_command(commands):
for command in commands:
print("RUNNING, ", command)
print("Pid: ", os.getpid())
os.system(command)
As shown above, I am attempting to break down my command into batches that will be executed in parallel.
Thanks for the help
iter(..).