Skip to content

Conversation

@T4rk1n
Copy link
Contributor

@T4rk1n T4rk1n commented Oct 22, 2024

Fix #2235

Add the following properties from flask.request to callback_context:

  • headers
  • cookies
  • path
  • remote
  • origin
triggered_inputs=callback_ctx.triggered_inputs,
ignore_register_page=True,
),
ctx_value,

Choose a reason for hiding this comment

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

When I try to run this with a background task, I get a callback error of kombu.exceptions.EncodeError: Object of type Response is not JSON serializable. It works if I pop 'dash_response' and 'background_callback_manager' from this dict though

Copy link
Member

Choose a reason for hiding this comment

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

Do we have any automated tests for background tasks to help catch this...?

Copy link
Member

Choose a reason for hiding this comment

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

Ah @T4rk1n I see you added one. Nice

@T4rk1n T4rk1n merged commit 0d9cd2c into dev Oct 23, 2024
3 checks passed
@T4rk1n T4rk1n deleted the fix/bg-cookies branch October 23, 2024 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

5 participants