Add documentation/examples using CeleryManager as background_callback_manager together with Dash Pages
roar-skinderviken opened this issue · comments
From the Dash doc, I'm able to create a simple, single-page Dash-app that uses CeleryManager. Please see main-branch in this repo:
https://github.com/roar-skinderviken/dash-celery-docker-compose
When trying to apply background_callback_manager/CeleryManager using Dash Pages, code stopped working, and I was not able to find any info (spent like two days). With DiskcacheManager, the code runs as expected. This pull request is showing what I've tried so far:
roar-skinderviken/dash-celery-docker-compose#1
Hence, some doc/examples on how to use background_callback_manager/CeleryManager with Dash Pages would be nice.
Hi @roar-skinderviken you can find a description of the issue and a workaround by @AnnMarieW in this minimal example:
https://github.com/AnnMarieW/dash-multi-page-app-demos/blob/main/multi_page_cache_background_callback/app.py
The example code solved my problem, thanks a lot @celia-lm!
It turned out that the only change I had to do, was to keep the Dash-app in a global var.