Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Partial DB replica emulation
Tomasz Magulski51d60786a711
diff --git a/saleor/settings.py b/saleor/settings.pyindex 0438e77769..659f4a939a 100644--- a/saleor/settings.py+++ b/saleor/settings.py@@ -86,19 +86,20 @@ DATABASE_CONNECTION_DEFAULT_NAME = "default"# TODO: For local envs will be activated in separate PR.# We need to update docs an saleor platform.# This variable should be set to `replica`-DATABASE_CONNECTION_REPLICA_NAME = "default"+DATABASE_CONNECTION_REPLICA_NAME = "replica"DATABASES = {DATABASE_CONNECTION_DEFAULT_NAME: dj_database_url.config(default="postgres://saleor:saleor@localhost:5432/saleor",conn_max_age=DB_CONN_MAX_AGE,),- # TODO: We need to add read only user to saleor platfrom, and we need to update- # docs.- # DATABASE_CONNECTION_REPLICA_NAME: dj_database_url.config(- # default="postgres://saleor_read_only:saleor@localhost:5432/saleor",- # conn_max_age=DB_CONN_MAX_AGE,- # ),+ DATABASE_CONNECTION_REPLICA_NAME: dj_database_url.config(+ default="postgres://saleor:saleor@localhost:5432/saleor",+ # TODO: We need to add read only user to saleor platform,+ # and we need to update docs.+ # default="postgres://saleor_read_only:saleor@localhost:5432/saleor",+ conn_max_age=DB_CONN_MAX_AGE,+ ),}DATABASE_ROUTERS = ["saleor.core.db_routers.PrimaryReplicaRouter"]