I have set up flask-redis-celery stack wherein a u...
# prefect-community
j
I have set up flask-redis-celery stack wherein a user can request a long running background task from flask frontend. The message is conveyed to celery worker which starts the chain of tasks in the background. I can get the status of tasks in flask frontend using asyncresult of celery. I want to replace celery with prefect. Any pointers for doing the same?
c
It sounds like you have a few features here that you’d like to implement: - a “scheduler” for your Flow which manages when each individual task should start running - some sort of frontend / webserver that you can hit to kick off flow runs - some way of determining each individual task’s state during a run The first point (building and executing a Flow) is very straightforward in Prefect Core. The other two features require an orchestration layer of some kind which is the primary purpose of Prefect Cloud
I believe you could put together a similar setup though if you dockerize your flow, and then standup a flask server that runs your flow inside your container on command. For knowing the state of your individual tasks, you might be able to roll something using task state handlers but it could be a hefty undertaking: https://docs.prefect.io/guide/core_concepts/notifications.html
j
OK. I will check it. Thanks.