Commit 46d16be5 by 宋毅

tj

parent e90cb160
node_modules/ node_modules/
localsettings.js
\ No newline at end of file
...@@ -7,7 +7,7 @@ class DbFactory { ...@@ -7,7 +7,7 @@ class DbFactory {
constructor() { constructor() {
const dbConfig = settings.database(); const dbConfig = settings.database();
dbConfig.reconnect = { dbConfig.reconnect = {
max_retries: 20, max_retries: 10,
onRetry: function (count) { onRetry: function (count) {
console.log("connection lost, trying to reconnect (" + count + ")"); console.log("connection lost, trying to reconnect (" + count + ")");
} }
......
var settings = {
redis: {
host: "43.247.184.32",
port: 8967,
password: "Gongsibao2018",
db: 5,
},
database: {
dbname: "tx-shop",
user: "write",
password: "write",
config: {
host: '43.247.184.35',
port: 8899,
dialect: 'mysql',
operatorsAliases: false,
pool: {
min: 0,
max: 50,
idle: 30000,//断开连接后,连接实例在连接池保持的时间
acquire: 30000,//请求超时时间
evict: 30000,
handleDisconnects: true
},
debug: false,
dialectOptions: {
requestTimeout: 999999,
// timezone: '+8:00'
// instanceName:'DEV'
} //设置MSSQL超时时间
}
},
reqEsDevUrl: "http://192.168.4.249:9200/",
reqHomePageDevUrl: "http://zcchannel.apps.com:4003/",
reqAuthUrl: "http://sj.app.com:4002/auth"
};
module.exports = settings;
...@@ -10,8 +10,8 @@ var ENVINPUT = { ...@@ -10,8 +10,8 @@ var ENVINPUT = {
REDIS_DB: process.env.QUEUE_REDIS_DB, REDIS_DB: process.env.QUEUE_REDIS_DB,
DB_NAME: process.env.QUEUE_DB_NAME, DB_NAME: process.env.QUEUE_DB_NAME,
APP_ENV: process.env.APP_ENV ? process.env.APP_ENV : "test",//运行环境 APP_ENV: process.env.APP_ENV ? process.env.APP_ENV : "test",//运行环境
CONSUMER_NAME: process.env.CONSUMER_NAME || "publicServiceAllocation.publicConsumer",//消费者名称 CONSUMER_NAME: process.env.CONSUMER_NAME || "publicLogs.publicLogsConsumer",//消费者名称
QUEUED_NAME: process.env.QUEUED_NAME || "SYTXPUBLIC-MSGQ",//队列名称,FAIL-失败队列(队列和失败队列一对存在进行部署) QUEUED_NAME: process.env.QUEUED_NAME || "LOGS-SYTXPUBLIC-MSGQ",//队列名称,FAIL-失败队列(队列和失败队列一对存在进行部署)
}; };
var settings = { var settings = {
env: ENVINPUT.APP_ENV, env: ENVINPUT.APP_ENV,
...@@ -46,12 +46,10 @@ var settings = { ...@@ -46,12 +46,10 @@ var settings = {
dialect: 'mysql', dialect: 'mysql',
operatorsAliases: false, operatorsAliases: false,
pool: { pool: {
max: 5,
min: 0, min: 0,
max: 50, acquire: 90000000,
idle: 30000,//断开连接后,连接实例在连接池保持的时间 idle: 1000000
acquire: 30000,//请求超时时间
evict: 30000,
handleDisconnects: true
}, },
timezone: '+08:00', timezone: '+08:00',
debug: false, debug: false,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment