-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: manager库支持了sequelize库的使用 #3
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -85,31 +85,16 @@ module.exports = appInfo => { | |
}; | ||
|
||
const userConfig = {}; | ||
|
||
// mysql | ||
userConfig.mysql = { | ||
app: true, | ||
agent: false, | ||
clients: { | ||
xprofiler_console: { | ||
host: '', | ||
port: 3306, | ||
user: '', | ||
password: '', | ||
database: 'xprofiler_console', | ||
}, | ||
xprofiler_logs: { | ||
host: '', | ||
port: 3306, | ||
user: '', | ||
password: '', | ||
database: 'xprofiler_logs', | ||
}, | ||
}, | ||
// sequelize | ||
config.sequelize = { | ||
dialect: 'postgres', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 默认 mysql |
||
database: '', | ||
host: '', | ||
port: 7092, | ||
username: '', | ||
password: '', | ||
}; | ||
|
||
// redis | ||
userConfig.redis = { | ||
config.redis = { | ||
client: { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 用 userConfig,config 是原则上不需要配置的参数,用默认的 dfault 即可 |
||
sentinels: null, | ||
port: 6379, | ||
|
@@ -118,19 +103,52 @@ module.exports = appInfo => { | |
db: 0, | ||
}, | ||
}; | ||
config.xprofilerConsole = 'http://127.0.0.1:8443'; | ||
// // mysql | ||
// userConfig.mysql = { | ||
// app: true, | ||
// agent: false, | ||
// clients: { | ||
// xprofiler_console: { | ||
// host: '', | ||
// port: 3306, | ||
// user: '', | ||
// password: '', | ||
// database: 'xprofiler_console', | ||
// }, | ||
// xprofiler_logs: { | ||
// host: '', | ||
// port: 3306, | ||
// user: '', | ||
// password: '', | ||
// database: 'xprofiler_logs', | ||
// }, | ||
// }, | ||
// }; | ||
|
||
// // redis | ||
// userConfig.redis = { | ||
// client: { | ||
// sentinels: null, | ||
// port: 6379, | ||
// host: '', | ||
// password: '', | ||
// db: 0, | ||
// }, | ||
// }; | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 这部分可以删除了 |
||
// mailer | ||
userConfig.mailer = { | ||
host: '', | ||
port: 25, | ||
secure: false, | ||
auth: { | ||
user: '', | ||
pass: '', | ||
}, | ||
}; | ||
|
||
userConfig.xprofilerConsole = ''; | ||
// userConfig.mailer = { | ||
// host: '', | ||
// port: 25, | ||
// secure: false, | ||
// auth: { | ||
// user: '', | ||
// pass: '', | ||
// }, | ||
// }; | ||
|
||
// userConfig.xprofilerConsole = ''; | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 这里保持原样,不要注释掉 |
||
return { | ||
...config, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
consoleQuery 和 logsQuery 在 seq 下如果都一致了,没必要区分两个方法了