question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support for `@app.long_callback` and improved documentation of asynchronous stack

See original GitHub issue

Hey there,

I am interested in implementing long-running responses. Currently I have configured an app’s timeout to 90+ seconds, and have a lot of very customized spinners. However, these long timeouts are bad practice and I should be subscribing to channels.

I have had trouble getting my stack configured to work with web sockets. I already use Redis as a cache and task queue, and I have tried a separate Daphne process, Celery process, and Diskcache. I have tried to set up asgi.py. Can you please add to your documentation regarding this extension?

Alternatively, can you try to implement the Dash abstraction for long polling responses/sockets, which is their “@app.long_callback” interface? If users could simply defer to the Dash documentation, I think it would grease the wheels for a lot of folks.

Thank you so much for providing this open-source software that does exactly what I want. If there is a clear path to me contributing the changes I want to see, please let me know. Since I can’t even get it working, though, it’s hard to imagine I can make improvements.

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
zachsiegel-capsidacommented, Jun 14, 2022

In short

  • The entire extended callback syntax did not work in DPD 1.6.6 with Django>=4.0. I could not access callback_context, dash_app, dash_app_id, request, session_state, user, or **kwargs as callback parameters. (I was still able to use dash.callback_context.triggered, for what it’s worth.)
  • With DPD 2.0 and Django>=4.0, I can definitely access these callback parameters. I haven’t tested them extensively, but they are definitely available.

Thank you for this update! @delsim please let me know whether I should comment on #403 about my experience.

0reactions
delsimcommented, Jun 14, 2022

Note that #403 is the task to move to Django 4.0

Read more comments on GitHub >

github_iconTop Results From Across the Web

Dash Labs 0.3.0: @app.long_callback support
It is a new callback decorator called @app.long_callback . I've included the current documentation inline below. As with other Dash Labs ...
Read more >
Asynchronous vs Synchronous Callbacks in Plotly Dash for ...
I am designing an app that will have multiple callbacks, each querying different tables of a SQL db. As I am designingg, it...
Read more >
Long Callbacks in Dash Web Apps - Towards Data Science
A long callback runs in a separate process and comes with additional options allowing you to improve the responsiveness of your app, e.g., ......
Read more >
Jakarta XML Web Services - GitHub Pages
Eclipse Implementation of XML Web Services Release Documentation ... Add support for Async Servlet Transport using Servlet 3.0 api.
Read more >
Callback Hell
A guide to writing asynchronous JavaScript programs. What is "callback hell"? Asynchronous JavaScript, or JavaScript that uses callbacks, is hard to get ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found