there is a flask celery
from celery import Celery
app = Celery('tasks', broker='amqp://guest@localhost//')
@app.task
def add(x, y):
return x + y
Question
I have a simple Flask application that uses SOAP calls to retrieve data and kick off a long running server process. Using SUDS, I've been able to make the call to get the data, parse it into JSON and return it to the application.
The second part is where I am getting stuck. I just want to kick off the server job and return immediately since I have another process polling the server for status (some of these jobs run for hours). I've read some posts about making asynchronous calls with Twisted or using a queue based approach but I don't need a callback when the process completes because of the polling.
Is there a way to simply make the call and quit?
Solution
there is a flask celery
from celery import Celery
app = Celery('tasks', broker='amqp://guest@localhost//')
@app.task
def add(x, y):
return x + y