Dash async within a callback

I have a callback in my app that needs to run a async function. Ofcourse i need to await it however this gives me the error :SyntaxError: ‘await’ outside async function

I thought lets remove the await however that gives me :
RuntimeWarning: coroutine ‘ClassName.FunctionName()’ was never awaited

Is there something that I missed?

1 Like

I would recommend running the async tasks in a separate worker process. I made a small MWE that demonstrates how it can be done using celery (task queue), redis (result cache) and rabbitmq (broker),

1 Like