mistercrunch commented on a change in pull request #8420: Redis password
URL:
https://github.com/apache/incubator-superset/pull/8420#discussion_r337346017
##########
File path: contrib/docker/superset_config.py
##########
@@ -45,12 +45,18 @@ def get_env_variable(var_name, default=None):
REDIS_HOST = get_env_variable('REDIS_HOST')
REDIS_PORT = get_env_variable('REDIS_PORT')
-
+REDIS_PASSWORD = get_env_variable('REDIS_PASSWORD')
+REDIS_DBNUMBER = get_env_variable('REDIS_DBNUMBER')
class CeleryConfig(object):
BROKER_URL = 'redis://%s:%s/0' % (REDIS_HOST, REDIS_PORT)
CELERY_IMPORTS = ('superset.sql_lab', )
- CELERY_RESULT_BACKEND = 'redis://%s:%s/1' % (REDIS_HOST, REDIS_PORT)
+ if REDIS_DBNUMBER == '' or REDIS_DBNUMBER is None:
Review comment:
Logic (`if`) in class definition seems like a bad idea. How about setting
`CELERY_RESULT_BACKEND` above in module scope?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]