مراية لـ
https://github.com/postalserver/postal.git
تم المزامنة 2025-11-30 21:32:30 +00:00
refactor: remove Postal.database_url
هذا الالتزام موجود في:
@@ -86,14 +86,6 @@ module Postal
|
||||
end
|
||||
end
|
||||
|
||||
def self.database_url
|
||||
if config.main_db
|
||||
"mysql2://#{CGI.escape(config.main_db.username.to_s)}:#{CGI.escape(config.main_db.password.to_s)}@#{config.main_db.host}:#{config.main_db.port}/#{config.main_db.database}?reconnect=true&encoding=#{config.main_db.encoding || 'utf8mb4'}&pool=#{config.main_db.pool_size}"
|
||||
else
|
||||
"mysql2://root@localhost/postal"
|
||||
end
|
||||
end
|
||||
|
||||
def self.logger_for(name)
|
||||
@loggers ||= {}
|
||||
@loggers[name.to_sym] ||= begin
|
||||
|
||||
@@ -7,7 +7,13 @@ module Postal
|
||||
# it would be undesirable as we'd just end up with lots of connections.
|
||||
|
||||
def self.new_client
|
||||
Mysql2::Client.new(host: Postal.config.message_db.host, username: Postal.config.message_db.username, password: Postal.config.message_db.password, port: Postal.config.message_db.port, reconnect: true, encoding: Postal.config.message_db.encoding || "utf8mb4")
|
||||
Mysql2::Client.new(
|
||||
host: Postal.config.message_db.host,
|
||||
username: Postal.config.message_db.username,
|
||||
password: Postal.config.message_db.password,
|
||||
port: Postal.config.message_db.port,
|
||||
encoding: Postal.config.message_db.encoding || "utf8mb4"
|
||||
)
|
||||
end
|
||||
|
||||
@free_clients = []
|
||||
|
||||
المرجع في مشكلة جديدة
حظر مستخدم