Skip to content

Commit fc6c6bc

Browse files
committed
updating missing long -> background adjustments and fixing issue for missing callback_ctx
1 parent 1aea686 commit fc6c6bc

File tree

4 files changed

+13
-7
lines changed

4 files changed

+13
-7
lines changed

.circleci/config.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,11 @@ jobs:
248248
steps:
249249
- checkout:
250250
path: ~/dash
251-
- run: sudo apt-get update
251+
- run:
252+
name: Add chrome keys & update.
253+
command: |
254+
wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
255+
sudo apt-get update
252256
- run: echo $PYVERSION > ver.txt
253257
- run: cat requirements/*.txt > requirements-all.txt
254258
- restore_cache:

dash/_callback.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -671,6 +671,7 @@ def add_context(*args, **kwargs):
671671
func,
672672
func_args,
673673
func_kwargs,
674+
callback_ctx
674675
)
675676

676677
output_value, has_update, skip = _update_background_callback(
@@ -741,6 +742,7 @@ async def async_add_context(*args, **kwargs):
741742
func,
742743
func_args,
743744
func_kwargs,
745+
callback_ctx
744746
)
745747
output_value, has_update, skip = _update_background_callback(
746748
error_handler, callback_ctx, response, kwargs, background, multi

dash/background_callback/managers/celery_manager.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class CeleryManager(BaseBackgroundCallbackManager):
1818

1919
def __init__(self, celery_app, cache_by=None, expire=None):
2020
"""
21-
Long callback manager that runs callback logic on a celery task queue,
21+
Background callback manager that runs callback logic on a celery task queue,
2222
and stores results using a celery result backend.
2323
2424
:param celery_app:
@@ -42,7 +42,7 @@ def __init__(self, celery_app, cache_by=None, expire=None):
4242
except ImportError as missing_imports:
4343
raise ImportError(
4444
"""\
45-
CeleryLongCallbackManager requires extra dependencies which can be installed doing
45+
CeleryManager requires extra dependencies which can be installed doing
4646
4747
$ pip install "dash[celery]"\n"""
4848
) from missing_imports
@@ -233,7 +233,7 @@ async def async_run():
233233
result_key,
234234
json.dumps(
235235
{
236-
"long_callback_error": {
236+
"background_callback_error": {
237237
"msg": str(err),
238238
"tb": traceback.format_exc(),
239239
}

dash/background_callback/managers/diskcache_manager.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class DiskcacheManager(BaseBackgroundCallbackManager):
1717

1818
def __init__(self, cache=None, cache_by=None, expire=None):
1919
"""
20-
Long callback manager that runs callback logic in a subprocess and stores
20+
Background callback manager that runs callback logic in a subprocess and stores
2121
results on disk using diskcache
2222
2323
:param cache:
@@ -40,7 +40,7 @@ def __init__(self, cache=None, cache_by=None, expire=None):
4040
except ImportError as missing_imports:
4141
raise ImportError(
4242
"""\
43-
DiskcacheLongCallbackManager requires extra dependencies which can be installed doing
43+
DiskcacheManager requires extra dependencies which can be installed doing
4444
4545
$ pip install "dash[diskcache]"\n"""
4646
) from missing_imports
@@ -279,7 +279,7 @@ async def async_run():
279279
cache.set(
280280
result_key,
281281
{
282-
"long_callback_error": {
282+
"background_callback_error": {
283283
"msg": str(err),
284284
"tb": traceback.format_exc(),
285285
}

0 commit comments

Comments
 (0)