You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Upon pressing the button you should see many numbers never increment, and many requests being made with a list of oldJob values.
This is unexpected, since the outputs don't correspond to the same concrete component.
The following patch resolves the issue in this example app.
diff --git a/dash/dash-renderer/src/actions/callbacks.ts b/dash/dash-renderer/src/actions/callbacks.ts
index 23da0a3f..a73af9d0 100644
--- a/dash/dash-renderer/src/actions/callbacks.ts+++ b/dash/dash-renderer/src/actions/callbacks.ts@@ -561,7 +561,7 @@ function handleServerside(
cacheKey: data.cacheKey as string,
cancelInputs: data.cancel,
progressDefault: data.progressDefault,
- output+ output: JSON.stringify(payload.outputs),
};
dispatch(addCallbackJob(jobInfo));
job = data.job;
@@ -761,9 +761,10 @@ export function executeCallback(
let lastError: any;
const additionalArgs: [string, string, boolean?][] = [];
+ const jsonOutput = JSON.stringify(payload.outputs);
values(getState().callbackJobs).forEach(
(job: CallbackJobPayload) => {
- if (cb.callback.output === job.output) {+ if (jsonOutput === job.output) {
// Terminate the old jobs that are not completed
// set as outdated for the callback promise to
// resolve and remove after.
The text was updated successfully, but these errors were encountered:
gvwilson
changed the title
[BUG] Pattern-matched long callbacks incorrectly cancelled
pattern-matched long callbacks cancelled incorrectly
Jan 9, 2025
Describe your context
Please provide us your environment, so we can easily reproduce the issue.
pip list | grep dash
belowDescribe the bug
Pattern-matched long callbacks incorrectly cancelled based on wildcard output
Consider the following example app:
Upon pressing the button you should see many numbers never increment, and many requests being made with a list of
oldJob
values.This is unexpected, since the outputs don't correspond to the same concrete component.
The following patch resolves the issue in this example app.
The text was updated successfully, but these errors were encountered: