logstash-output-jdbc 0.2.2 → 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/logstash/outputs/jdbc.rb +4 -2
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9d9c04c7056a8af5071a1da2710a14339093abf3
4
- data.tar.gz: 4dd0af7eca9417f9c51944b0fb325c42c4cc4ea7
3
+ metadata.gz: 68dade27398ee4f7682df9353b6c392635c52036
4
+ data.tar.gz: a02adde147e79062c3034f21b0894f800e460df2
5
5
  SHA512:
6
- metadata.gz: abb87d28ba5e8cb5031d5a9a3b23ab44d925608cd8ce81646406366a4f45bac690c356618c74e1b28b57fe63f3c48b6c0cdea78e095882126da36ef73d52634c
7
- data.tar.gz: 7ea9fc64a0a90155228dc276af38d394ac135e5cbb91af37ee05cad8b64d8355c339da076eaabdc5e2e3fa404ad86af2fc16d3744ca079a38fb830516bb4384e
6
+ metadata.gz: e97f6280c8e1d49fc37b9736656df26a35a107582c36bebf7c17a038e5324771aab6cb83380fc4555f57be820e1e2e42614e4611d2605b6d8b0dd08d0ccc9bf6
7
+ data.tar.gz: df35f18204e43b2a4ab9b13c67c7edf7c2d3af9ee3be376f15a38e1a2a4650a540cb08fa8927488dd4b15784e1838ed9824579c413899b34ff8e80e6d0b80b35
@@ -44,7 +44,7 @@ class LogStash::Outputs::Jdbc < LogStash::Outputs::Base
44
44
  config :max_pool_size, :validate => :number, :default => 5
45
45
 
46
46
  # Connection timeout
47
- config :connection_timeout, :validate => :number, :default => 2800
47
+ config :connection_timeout, :validate => :number, :default => 10000
48
48
 
49
49
  # We buffer a certain number of events before flushing that out to SQL.
50
50
  # This setting controls how many events will be buffered before sending a
@@ -156,9 +156,11 @@ class LogStash::Outputs::Jdbc < LogStash::Outputs::Base
156
156
  @pool.setMaximumPoolSize(@max_pool_size)
157
157
  @pool.setConnectionTimeout(@connection_timeout)
158
158
 
159
+ validate_connection_timeout = (@connection_timeout / 1000) / 2
160
+
159
161
  # Test connection
160
162
  test_connection = @pool.getConnection()
161
- unless test_connection.isValid(10)
163
+ unless test_connection.isValid(validate_connection_timeout)
162
164
  @logger.error("JDBC - Connection is not valid. Please check connection string or that your JDBC endpoint is available.")
163
165
  end
164
166
  test_connection.close()
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-output-jdbc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - the_angry_angel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-30 00:00:00.000000000 Z
11
+ date: 2016-02-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: logstash-core