I would like Prefect to fire up a little Flask server with parameters set by the job, use the server for a group of tasks, and then shut it down tidily. I tried to do this by running the app's
main()
function with a
ConcurrentTaskRunner
but everything just went on hold until the Flask job was killed.
Is there a better way to do this? Should I dockerise the Flask server and use the
docker
module in Python to start and stop it? Is using a DockerContainer to start it going to block other tasks? Other suggestions?
j
Jean Luciano
01/12/2023, 3:47 PM
Have you tried running in a process and then killing the process when done?
k
Kate Weber
01/12/2023, 6:49 PM
That's another approach. Just wanted to make sure that if there was a Prefect-ish Way of doing things that I used it.
Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.