I have a celery assignment:
@app.task def do_something(with_this):
How can I mark a task as completed manually?
In this case, the function ends without a return , so task.result I get None , I want to set the data passed to the callback function as a result and mark the task as completed.
I tried using:
app.backend.mark_as_done(do_something.request.id, data)
It successfully sets the state and result of the task, but later the result is set to the return value of the function, which is None here.
source share