Skip to content

Commit 7845b2c

Browse files
committed
Add note on params that only work with background callbacks
1 parent 8297e54 commit 7845b2c

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

dash/_callback.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,12 +118,14 @@ def callback(
118118
the app layout. The second element is the value that the property
119119
should be set to while the callback is running, and the third element
120120
is the value the property should be set to when the callback completes.
121+
This parameter only applies to background callbacks (`background=True`).
121122
:param cancel:
122123
A list of `Input` dependency objects that reference a property of a
123124
component in the app's layout. When the value of this property changes
124125
while a callback is running, the callback is canceled.
125126
Note that the value of the property is not significant, any change in
126127
value will result in the cancellation of the running job (if any).
128+
This parameter only applies to background callbacks (`background=True`).
127129
:param progress:
128130
An `Output` dependency grouping that references properties of
129131
components in the app's layout. When provided, the decorated function
@@ -132,21 +134,25 @@ def callback(
132134
function should call in order to provide updates to the app on its
133135
current progress. This function accepts a single argument, which
134136
correspond to the grouping of properties specified in the provided
135-
`Output` dependency grouping
137+
`Output` dependency grouping. This parameter only applies to background
138+
callbacks (`background=True`).
136139
:param progress_default:
137140
A grouping of values that should be assigned to the components
138141
specified by the `progress` argument when the callback is not in
139142
progress. If `progress_default` is not provided, all the dependency
140143
properties specified in `progress` will be set to `None` when the
141-
callback is not running.
144+
callback is not running. This parameter only applies to background
145+
callbacks (`background=True`).
142146
:param cache_args_to_ignore:
143147
Arguments to ignore when caching is enabled. If callback is configured
144148
with keyword arguments (Input/State provided in a dict),
145149
this should be a list of argument names as strings. Otherwise,
146150
this should be a list of argument indices as integers.
151+
This parameter only applies to background callbacks (`background=True`).
147152
:param cache_ignore_triggered:
148153
Whether to ignore which inputs triggered the callback when creating
149-
the cache.
154+
the cache. This parameter only applies to background callbacks
155+
(`background=True`).
150156
:param interval:
151157
Time to wait between the background callback update requests.
152158
:param on_error:

0 commit comments

Comments
 (0)