Implentada RQ_Queues en el proyecto

This commit is contained in:
Daniel Cortes
2020-06-08 03:49:12 -04:00
parent 0d2d23e2e1
commit 0e2ac5a1e3
2 changed files with 15 additions and 1 deletions

View File

@@ -28,6 +28,7 @@ INSTALLED_APPS = [
'oauth2_provider', 'oauth2_provider',
'corsheaders', 'corsheaders',
'rest_framework', 'rest_framework',
'django_rq',
'fetcher.apps.FetcherConfig', 'fetcher.apps.FetcherConfig',
'users.apps.UsersConfig', 'users.apps.UsersConfig',
@@ -89,6 +90,18 @@ CACHES = {
} }
} }
RQ_QUEUES = {
'high': {
'USE_REDIS_CACHE': 'default',
},
'default': {
'USE_REDIS_CACHE': 'default',
},
'low': {
'USE_REDIS_CACHE': 'default',
},
}
SESSION_ENGINE = "django.contrib.sessions.backends.cache" SESSION_ENGINE = "django.contrib.sessions.backends.cache"
SESSION_CACHE_ALIAS = "default" SESSION_CACHE_ALIAS = "default"

View File

@@ -6,6 +6,7 @@ pygments # To make cute pretty prints XD
ratelimit # To rate limit request to musicbrainz ratelimit # To rate limit request to musicbrainz
redis # To comunicate with redis redis # To comunicate with redis
django-redis # Redis backend for django django-redis # Redis backend for django
django-rq #Job queue
requests # Saner request library requests # Saner request library
blake3 # To use blake3 hashing, since python seeds every hash on hashlib and is different between instances blake3 # To use blake3 hashing, since python seeds every hash on hashlib and is different between instances
country_list # To transform country codes to their names country_list # To transform country codes to their names