Skip to content

Commit

Permalink
Check memcached backend in Django (#2778)
Browse files Browse the repository at this point in the history
Bail if using old memcached backend
  • Loading branch information
chadwhitacre authored Feb 8, 2024
1 parent 2346a69 commit faef482
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ source install/check-minimum-requirements.sh
source install/turn-things-off.sh
source install/create-docker-volumes.sh
source install/ensure-files-from-examples.sh
source install/check-memcached-backend.sh
source install/ensure-relay-credentials.sh
source install/generate-secret-key.sh
source install/update-docker-images.sh
Expand Down
16 changes: 16 additions & 0 deletions install/check-memcached-backend.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
echo "${_group}Checking memcached backend ..."

if grep -q "\.PyMemcacheCache" "$SENTRY_CONFIG_PY"; then
echo "PyMemcacheCache found in $SENTRY_CONFIG_PY, gonna assume you're good."
else
if grep -q "\.MemcachedCache" "$SENTRY_CONFIG_PY"; then
echo "MemcachedCache found in $SENTRY_CONFIG_PY, you should switch to PyMemcacheCache."
echo "See:"
echo " https://develop.sentry.dev/self-hosted/releases/#breaking-changes"
exit 1
else
echo 'Your setup looks weird. Good luck.'
fi
fi

echo "${_endgroup}"

0 comments on commit faef482

Please sign in to comment.