Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stripping Input Data from Background Callback Polling #3113

Open
wants to merge 8 commits into
base: dev
Choose a base branch
from

Conversation

BSd3v
Copy link
Contributor

@BSd3v BSd3v commented Dec 30, 2024

Attempting to make polling requests not eat bandwidth

This is to fix #3111

@gvwilson gvwilson added feature something new community community contribution labels Jan 3, 2025
@gvwilson
Copy link
Contributor

gvwilson commented Jan 3, 2025

@T4rk1n can you please review? thx

Copy link
Contributor

@T4rk1n T4rk1n left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall. I just have a question if we could just do body = "{}" if we have the cache key instead of setting the inputs to null, think that might require some work on the backend callback but wouldn't it be better?

dash/dash-renderer/src/actions/callbacks.ts Outdated Show resolved Hide resolved
dash/dash-renderer/src/actions/callbacks.ts Outdated Show resolved Hide resolved
@BSd3v
Copy link
Contributor Author

BSd3v commented Jan 6, 2025

@T4rk1n,

This would indeed take much more effort to unwind how the background callbacks function to completely strip the need for the input structure, as this is used to verify the callback structure, as well as pull things like context (I'm assuming for using things like progress updates)


If we want to do this in a rework, it should probably be done with my other open PR, as this will require a much more lengthy refactor. This PR however wouldnt require a rework and would solve the issue with lengthy data being passed to the backend when unnecessary.

@T4rk1n
Copy link
Contributor

T4rk1n commented Jan 6, 2025

This would indeed take much more effort to unwind how the background callbacks function to completely strip the need for the input structure, as this is used to verify the callback structure, as well as pull things like context (I'm assuming for using things like progress updates)

It's fine like this, I don't think the refactor is really worth the effort for now.

Copy link
Contributor

@T4rk1n T4rk1n left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💃 Looks good, thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community community contribution feature something new
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Background callback polling request sends all callback inputs, states, outputs each time
3 participants