Skip to content

Commit

Permalink
Merge pull request #133 from leonardocintra/remove-redis
Browse files Browse the repository at this point in the history
feat: remove redis cache
  • Loading branch information
leonardocintra authored Oct 24, 2022
2 parents be5b653 + 6921de0 commit aa3e74e
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 38 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ Seu PC precisa ter instalado
- Django
- Docker
- Postgress
- Redis / Heroku-Redis
- Bootstrap
- Mailgun (sistema de emails)
- Cloudinary (sistema de armazenamento de imagens)
Expand Down
5 changes: 0 additions & 5 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
version: '3.5'

services:
redis:
image: redis
command: redis-server --requirepass likeEstampa
ports:
- "6379:6379"
postgres:
container_name: likeestampa_container
image: postgres
Expand Down
9 changes: 0 additions & 9 deletions likeestampa/settings/aws.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,6 @@
# TELEGRAM
TELEGRAM_TOKEN = env("TELEGRAM_TOKEN")

# REDIS
CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.redis.RedisCache',
'LOCATION': env('REDIS_URL'),
'TIMEOUT': env.int('REDIS_TIMEOUT', 2000),
}
}

# SENTRY
if not DEBUG:
sentry_sdk.init(
Expand Down
6 changes: 2 additions & 4 deletions likeestampa/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,10 @@
# Update database configuration with $DATABASE_URL.
DATABASES['default'].update(dj_database_url.config())

# REDIS - CACHE
# CACHE
CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.redis.RedisCache',
'LOCATION': os.environ.get('REDIS_URL', 'redis://default:likeEstampa@127.0.0.1:6379'),
'TIMEOUT': 2000,
'BACKEND': 'django.core.cache.backends.locmem.LocMemCache'
}
}

Expand Down
9 changes: 0 additions & 9 deletions likeestampa/settings/heroku.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,6 @@
# TELEGRAM
TELEGRAM_TOKEN = env("TELEGRAM_TOKEN")

# REDIS
CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.redis.RedisCache',
'LOCATION': env('REDIS_URL'),
'TIMEOUT': env.int('REDIS_TIMEOUT', 2000),
}
}

# SENTRY
if not DEBUG:
sentry_sdk.init(
Expand Down
9 changes: 0 additions & 9 deletions likeestampa/settings/railway.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,6 @@
# TELEGRAM
TELEGRAM_TOKEN = env("TELEGRAM_TOKEN")

# REDIS
CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.redis.RedisCache',
'LOCATION': env('REDIS_URL'),
'TIMEOUT': env.int('REDIS_TIMEOUT', 2000),
}
}

# SENTRY
if not DEBUG:
sentry_sdk.init(
Expand Down
1 change: 0 additions & 1 deletion requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ gunicorn==20.1.0
mercadopago==2.0.10
pytest==6.2.4
python-telegram-bot==13.7
redis==4.1.4
requests==2.25.1
sentry-sdk==1.7.1
urllib3==1.26.5
Expand Down

0 comments on commit aa3e74e

Please sign in to comment.