Callback doesn't update page layout if same callback is fired again before previous callback completes
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 24.4k
- Forks
- 2.3k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 13
Description
Describe your context
dash 1.3.1
dash-core-components 1.2.1
dash-html-components 1.0.1
dash-renderer 1.1.0
dash-table 4.3.0
- OS: Linux (Debian 10)
- Browser: Firefox
- Version 60.9.0esr (64-bit)
Describe the bug
I have a callback who's input is the "n_intervals" attribute of a dcc.Interval component. If the callback function takes longer to return than the length of the interval driving it, then page layout is never changed by this callback. The updating of page layout silently fails. My current temporary fix is to make the intervals for these callbacks much larger than I would like, making the application sluggish.
Expected behavior
The page layout should be updated with the latest return value available, even if the callback has fired again and is awaiting a new return value.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with a dcc.Interval input whose callback takes longer than the interval, using the versions and Firefox environment described. Trace the callback and page-layout update flow, then verify that the latest completed return value is applied even when another invocation is still waiting.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100