Skip to content

Commit

Permalink
memcached cache
Browse files Browse the repository at this point in the history
  • Loading branch information
unicolet committed Apr 19, 2014
1 parent df7c16a commit 9db87cc
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 6 deletions.
15 changes: 15 additions & 0 deletions salt/states/salt/sentry/init.sls
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@ extra-sentry-packages:
- expect
- python-pip
- gcc
- memcached

memcached:
service:
- running
- enable: True
- require:
- pkg: extra-sentry-packages

sentryvenv:
virtualenv.managed:
Expand All @@ -40,6 +48,8 @@ sentryvenv:
- file: /etc/profile.d/pg.sh
- file: /etc/sentry.conf.py
- postgres_database: {{ pillar['sentry_server']['db_name'] }}
- pip: python-memcached
- service: memcached

/opt/sentry/venv:
file.directory:
Expand Down Expand Up @@ -131,3 +141,8 @@ raven=={{ pillar['raven']['version'] }}:
- require:
- pkg: extra-sentry-packages

python-memcached:
pip.installed:
- require:
- pkg: extra-sentry-packages

12 changes: 6 additions & 6 deletions salt/states/salt/sentry/sentry.conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@
# You'll need to install the required dependencies for Memcached:
# pip install python-memcached
#
# CACHES = {
# 'default': {
# 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
# 'LOCATION': ['127.0.0.1:11211'],
# }
# }
CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
'LOCATION': ['127.0.0.1:11211'],
}
}

###########
## Queue ##
Expand Down

0 comments on commit 9db87cc

Please sign in to comment.