Paul Vanetti
01/20/2021, 1:35 PMJim Crist-Harif
01/20/2021, 4:55 PMtask.map([1, 2, 3], 1) # the 2nd parameter isn't mappable
If all inputs to mapped tasks should be mappable, then there might be a bug (or something else going on). We'd need a reproducible example to help debug further.Paul Vanetti
01/21/2021, 9:52 PMimport datetime
import prefect
@prefect.task(max_retries=10, retry_delay=datetime.timedelta(seconds=900))
def task_a():
if prefect.context.task_run_count < 2:
raise Exception()
return 'a result'
@prefect.task
def task_b(a, c):
return 'b result'
with prefect.Flow('flow name') as flow:
a = task_a()
b = task_b.map(prefect.unmapped(a), [1, 2, 3])
flow.run_config = prefect.run_configs.DockerRun()
flow.storage = prefect.storage.Docker(
# python image
)
flow.register('project')
Jim Crist-Harif
01/21/2021, 10:54 PMMarvin
01/21/2021, 10:55 PMPaul Vanetti
01/22/2021, 9:03 AM