mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
PLT-6341/PLT-6342 Update gorp to mattermost fork and add connection timeout setting (#6410)
* Update gorp to mattermost fork and add connection timeout setting * Add go dependency * Rename from connection timeout to query timeout * Properly add gorp dependency
This commit is contained in:
@@ -29,6 +29,7 @@ export default class DatabaseSettings extends AdminSettings {
|
||||
config.SqlSettings.MaxOpenConns = this.parseIntNonZero(this.state.maxOpenConns);
|
||||
config.SqlSettings.AtRestEncryptKey = this.state.atRestEncryptKey;
|
||||
config.SqlSettings.Trace = this.state.trace;
|
||||
config.SqlSettings.QueryTimeout = this.parseIntNonZero(this.state.queryTimeout);
|
||||
|
||||
return config;
|
||||
}
|
||||
@@ -40,7 +41,8 @@ export default class DatabaseSettings extends AdminSettings {
|
||||
maxIdleConns: config.SqlSettings.MaxIdleConns,
|
||||
maxOpenConns: config.SqlSettings.MaxOpenConns,
|
||||
atRestEncryptKey: config.SqlSettings.AtRestEncryptKey,
|
||||
trace: config.SqlSettings.Trace
|
||||
trace: config.SqlSettings.Trace,
|
||||
queryTimeout: config.SqlSettings.QueryTimeout
|
||||
};
|
||||
}
|
||||
|
||||
@@ -128,6 +130,24 @@ export default class DatabaseSettings extends AdminSettings {
|
||||
value={this.state.maxOpenConns}
|
||||
onChange={this.handleChange}
|
||||
/>
|
||||
<TextSetting
|
||||
id='queryTimeout'
|
||||
label={
|
||||
<FormattedMessage
|
||||
id='admin.sql.queryTimeoutTitle'
|
||||
defaultMessage='Query Timeout:'
|
||||
/>
|
||||
}
|
||||
placeholder={Utils.localizeMessage('admin.sql.queryTimeoutExample', 'Ex "30"')}
|
||||
helpText={
|
||||
<FormattedMessage
|
||||
id='admin.sql.queryTimeoutDescription'
|
||||
defaultMessage='The number of seconds to wait for a response from the database after opening a connection and sending the query. Errors that you see in the UI or in the logs as a result of a query timeout can vary depending on the type of query. This setting has no effect on PostgreSQL databases.'
|
||||
/>
|
||||
}
|
||||
value={this.state.queryTimeout}
|
||||
onChange={this.handleChange}
|
||||
/>
|
||||
<GeneratedSetting
|
||||
id='atRestEncryptKey'
|
||||
label={
|
||||
|
||||
Reference in New Issue
Block a user