add mysql config option wait timeout
This commit is contained in:
@@ -63,7 +63,8 @@ class MyAesCrypt
|
|||||||
shop_json = JSON.parse(shop_data)
|
shop_json = JSON.parse(shop_data)
|
||||||
shop_json["data"].each do |j|
|
shop_json["data"].each do |j|
|
||||||
if j["lookup"] == from
|
if j["lookup"] == from
|
||||||
if(j["value"]["key"] == token)
|
# add [0...44] for production cloud for remove \n
|
||||||
|
if(j["value"]["key"][0...44] == token)
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ module ActiveRecord
|
|||||||
end
|
end
|
||||||
|
|
||||||
client = Mysql2::Client.new(config.symbolize_keys)
|
client = Mysql2::Client.new(config.symbolize_keys)
|
||||||
options = [config[:host], config[:username], config[:password], config[:database], config[:port], config[:socket], 0]
|
options = [config[:host], config[:username], config[:password], config[:database], config[:port], config[:socket], config[:wait_timeout], 0]
|
||||||
ConnectionAdapters::Mysql2Adapter.new(client, logger, options, config)
|
ConnectionAdapters::Mysql2Adapter.new(client, logger, options, config)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user