ad-m commented on a change in pull request #18642: URL: https://github.com/apache/superset/pull/18642#discussion_r803249440
########## File path: helm/superset/templates/_helpers.tpl ########## @@ -89,6 +89,21 @@ WTF_CSRF_ENABLED = True WTF_CSRF_EXEMPT_LIST = [] # A CSRF token that expires in 1 year WTF_CSRF_TIME_LIMIT = 60 * 60 * 24 * 365 +{{- if .Values.supersetNode.connections.redis_password }} +class CeleryConfig(object): Review comment: I have in mind something like: ``` class CeleryConfig(object): CELERY_ANNOTATIONS = {'tasks.add': {'rate_limit': '10/s'}} CELERY_IMPORTS = ('superset.sql_lab', ) {{- if .Values.supersetNode.connections.redis_password }} CELERY_RESULT_BACKEND = f"redis://{env('REDIS_PASSWORD')}@{env('REDIS_HOST')}:{env('REDIS_PORT')}/0" BROKER_URL = f"redis://{env('REDIS_PASSWORD')}@{env('REDIS_HOST')}:{env('REDIS_PORT')}/0" {{- else }} CELERY_RESULT_BACKEND = f"redis://{env('REDIS_HOST')}:{env('REDIS_PORT')}/0" BROKER_URL = f"redis://{env('REDIS_HOST')}:{env('REDIS_PORT')}/0" {{- end -}} CELERY_CONFIG = CeleryConfig RESULTS_BACKEND = RedisCache( host=env('REDIS_HOST'), {{- if .Values.supersetNode.connections.redis_password }} password=env('REDIS_PASSWORD'), {{- end -}} port=env('REDIS_PORT'), key_prefix='superset_results' ) ``` Do you think readability has been maintained? -- 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. To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For additional commands, e-mail: notifications-h...@superset.apache.org