Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Adds exercise cache settings to docker

Roland Geiderbf2a32f788c4
diff --git a/extras/docker/production/settings.py b/extras/docker/production/settings.py
index b3bc64862..39b07c1cf 100644
--- a/extras/docker/production/settings.py
+++ b/extras/docker/production/settings.py
@@ -101,6 +101,8 @@ WGER_SETTINGS["SYNC_INGREDIENTS_CELERY"] = env.bool("SYNC_INGREDIENTS_CELERY", F
WGER_SETTINGS["SYNC_OFF_DAILY_DELTA_CELERY"] = env.bool("SYNC_OFF_DAILY_DELTA_CELERY", False)
WGER_SETTINGS["USE_RECAPTCHA"] = env.bool("USE_RECAPTCHA", False)
WGER_SETTINGS["USE_CELERY"] = env.bool("USE_CELERY", False)
+WGER_SETTINGS["CACHE_API_EXERCISES_CELERY"] = env.bool("CACHE_API_EXERCISES_CELERY", False)
+WGER_SETTINGS["CACHE_API_EXERCISES_CELERY_FORCE_UPDATE"] = env.bool("CACHE_API_EXERCISES_CELERY_FORCE_UPDATE", False)
#
# Auth Proxy Authentication
diff --git a/wger/exercises/cache.py b/wger/exercises/cache.py
index cd1fc70a7..6c8ab26f6 100644
--- a/wger/exercises/cache.py
+++ b/wger/exercises/cache.py
@@ -28,10 +28,10 @@ def cache_exercise(
Caches a provided exercise.
"""
if force:
- print_fn(f'Force updating cache for exercise base {exercise.uuid}')
+ print_fn(f'Force updating cache for exercise {exercise.uuid}')
reset_exercise_api_cache(exercise.uuid)
else:
- print_fn(f'Warming cache for exercise base {exercise.uuid}')
+ print_fn(f'Warming cache for exercise {exercise.uuid}')
serializer = ExerciseInfoSerializer(exercise)
serializer.data