I would like Prefect to fire up a little Flask ser...
# prefect-getting-started
k
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
Have you tried running in a process and then killing the process when done?
k
That's another approach. Just wanted to make sure that if there was a Prefect-ish Way of doing things that I used it.