hi all, I've been in transition to prefect 2 (2.0.4 to be precise) from prefect < 2 (1,2 to be precise). Thanks to your help I sovled most of the problems, only one remains:
in prefect < 2 I used parallelism via
multiprocessing.Process
as
processes = []
for chunk in url_chunks:
kwargs["mp3_urls"] = chunk
processes.append(mp.Process(foo=foo, kwargs=kwargs))
for p in processes:
p.start()
for p in processes:
p.join()
and it worked. The main reason for using
multiprocessing.Process
is to have a large model in memory shared between processes.
In fact it works when I run this exact flow with prefect via a python script calling the flow as a fucntion, it works as expected. However, when run it as
prefect deployment run ...
or via a scheduled run, the processes in
p.start()
don't run. The flow result is marked as success to my surprise.
Any ideas?