Erik Amundson
10/20/2023, 8:56 PM@task(max_concurrency=100) # concurrency limit defined in task decorator
def fn(i: int)
print(i)
@flow
def main():
map_range = list(range(1000))
fn.map(map_range)
or this
@task
def fn(i: int)
print(i)
@flow
def main():
map_range = list(range(1000))
fn.map(map_range, max_concurrency=100) # concurrency limit defined at task submission
In either case, we'd only want 100 instances of fn
running at a given time.
I know we can set concurrency limits in the cloud and task tags but this would be much nicer for us if possible!Nate
10/20/2023, 9:03 PMErik Amundson
10/21/2023, 3:05 AM