Skip to content

Add note on params that only work with background callbacks #3263

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

Merged
merged 3 commits into from
Apr 9, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions dash/_callback.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ def callback(
while a callback is running, the callback is canceled.
Note that the value of the property is not significant, any change in
value will result in the cancellation of the running job (if any).
This parameter only applies to background callbacks (`background=True`).
:param progress:
An `Output` dependency grouping that references properties of
components in the app's layout. When provided, the decorated function
Expand All @@ -132,21 +133,25 @@ def callback(
function should call in order to provide updates to the app on its
current progress. This function accepts a single argument, which
correspond to the grouping of properties specified in the provided
`Output` dependency grouping
`Output` dependency grouping. This parameter only applies to background
callbacks (`background=True`).
:param progress_default:
A grouping of values that should be assigned to the components
specified by the `progress` argument when the callback is not in
progress. If `progress_default` is not provided, all the dependency
properties specified in `progress` will be set to `None` when the
callback is not running.
callback is not running. This parameter only applies to background
callbacks (`background=True`).
:param cache_args_to_ignore:
Arguments to ignore when caching is enabled. If callback is configured
with keyword arguments (Input/State provided in a dict),
this should be a list of argument names as strings. Otherwise,
this should be a list of argument indices as integers.
This parameter only applies to background callbacks (`background=True`).
:param cache_ignore_triggered:
Whether to ignore which inputs triggered the callback when creating
the cache.
the cache. This parameter only applies to background callbacks
(`background=True`).
:param interval:
Time to wait between the background callback update requests.
:param on_error:
Expand Down