Open jonnyrobbie opened 7 months ago
it shows "running immediately after pressing the button. Then after a second, "still sunning" is shown and after yet another second "finished" is displayed and stays on the screen.
If you have a sleep for 1 second, before setting "running" it is never going to appear right with the default settings.
The background callbacks operates a chains of requests, it wait for interval
argument which by default is 1000 ms. You can set the interval
to a lower amount to ensure faster retrieval of progress values.
The documentation is extremely unclear of the inner workings. The https://dash.plotly.com/background-callbacks sections does not mention the behaviour you mentioned at all and does not mention any limitations for the bg callback progress callable. API reference just says "interval - Time to wait between the long callback update requests.", which explains very little.
python 3.10.13 dash 2.16.0
if frontend related, tell us your Browser, Version and OS
Describe the bug
A function callable of a callback with a progress param doesn't seem to get hooked immediately. And calls to this callable seem to be ignored sometimes - especially fraction of a seconds after the callback itself has been triggered.
Expected behavior
MVE:
Run this app and click the button.
Expected behaviour:
Observed behaviour: