feat: custom database port for read-only replica configuration
This commit is contained in:
parent
85834d7a00
commit
1ee2385944
1 changed files with 1 additions and 4 deletions
|
|
@ -235,14 +235,11 @@ def connect_replica():
|
|||
from frappe.database import get_db
|
||||
user = local.conf.db_name
|
||||
password = local.conf.db_password
|
||||
port = None
|
||||
port = local.conf.replica_db_port
|
||||
|
||||
if local.conf.different_credentials_for_replica:
|
||||
user = local.conf.replica_db_name
|
||||
password = local.conf.replica_db_password
|
||||
|
||||
if local.conf.replica_db_port:
|
||||
port = local.conf.replica_db_port
|
||||
|
||||
local.replica_db = get_db(host=local.conf.replica_host, user=user, password=password, port=port)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue