Skip to content

[BUG] Long callbacks triggered multiple times with concurrency #2067

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

Closed
vkolevrestec opened this issue May 27, 2022 · 3 comments
Closed

[BUG] Long callbacks triggered multiple times with concurrency #2067

vkolevrestec opened this issue May 27, 2022 · 3 comments

Comments

@vkolevrestec
Copy link

Describe your context

dash                      2.0.0
dash-bootstrap-components 1.0.0
dash-core-components      2.0.0
dash-html-components      2.0.0
dash-table                5.0.0

Describe the bug

The long callback acts strange, the progress bar starts loading and then goes back and forth.
It is working locally on Ubuntu 18.

Azure configuration:
Azure App Service, Ubuntu 18

Startup command:
gunicorn --bind=0.0.0.0:$PORT -w 4 --timeout 60 wsgi:app & celery --app dashboard.celery_app worker --concurrency=8 -l info

Code setup:
long_callback_manager = CeleryLongCallbackManager(celery_dash_app, cache_by=[lambda: uuid4, ])
dashapp = dash.Dash(
...,
long_callback_manager=long_callback_manager
)

Expected behavior

The snippet should work like this one , Example 4: Progress Bar.

Screenshots
long_callback

@vkolevrestec vkolevrestec changed the title [BUG] [BUG] Long callbacks triggered multiple times with concurrency May 27, 2022
@ayhteo
Copy link

ayhteo commented May 28, 2022

I think this might also have been described in #1769 (comment), I have a similar problem when using for loops in a long_callback.

@vkolevrestec
Copy link
Author

vkolevrestec commented May 31, 2022

Thank you for referencing the main thread.
I tried to do a workaround by increasing the interval and It's still buggy.
long_callback5

If I increase the interval to more than the job requires I get the result directly, but I will have to wait that extra time.

I'll try this workaround by sebbegg as well, until we get a proper solution by Dash.

@vkolevrestec
Copy link
Author

Will be fixed in #2039

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

No branches or pull requests

2 participants