ruby_event_store-outbox 0.0.8 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9457e402dabad2f00ec38ce0a6aecb12dcfdd303614b0ed6c8e391214e2eece1
4
- data.tar.gz: 8545183b1d4720f5674cfdd5cf385666f2cfcd38ed2cc9fdd4bf8aa79c750835
3
+ metadata.gz: da07b2263a96dbbfaad959ab5dd5636d5bb3398d810894080ab6e3f80750c29f
4
+ data.tar.gz: 53cd5a2de183f9c821eacf6c05689f42e1fdc39120aac25aa450f90601bbd964
5
5
  SHA512:
6
- metadata.gz: dc5d885558ac2c2d3b446cc1499a9ceb8aaa541b29c1b85e8019cd832ca2572d883c4fa165abbcedc9470f36f29667becc0b7b937c49fc00b3a3aed2714699db
7
- data.tar.gz: 4371dcb52922553adebe91a4fb36472c27bb0a4df0a76ec6782aaf4c48b57e424d55e7f8ba262b5f694d8d5c32e6062bbc504f8ca5e2edfb04767d0278cccc95
6
+ metadata.gz: d6e7cb309a64e4743ae5e6d182987c7b1d35378b0a371ce784c2f0695de026903a92d58106e98fdbab73687bf0c35f89912a614982f8347e5b4d0f0ab0daabf4
7
+ data.tar.gz: 1d7fe76b631564b4205dab9f928da9487e6db08cf93cee9b52a975b7cad65dddd07de97babd586851855c262f1428f902a3612185b9bc0fc7f3a4fa848c0024c
@@ -60,8 +60,6 @@ module RubyEventStore
60
60
 
61
61
  def build_consumer(options)
62
62
  logger = Logger.new(STDOUT, level: options.log_level, progname: "RES-Outbox")
63
- # ActiveRecord::Base.logger = logger if options.log_level == :debug
64
- # ActiveSupport::LogSubscriber.colorize_logging = false
65
63
  consumer_configuration = Consumer::Configuration.new(
66
64
  split_keys: options.split_keys,
67
65
  message_format: options.message_format,
@@ -46,7 +46,10 @@ module RubyEventStore
46
46
  @metrics = metrics
47
47
  @batch_size = configuration.batch_size
48
48
  ActiveRecord::Base.establish_connection(configuration.database_url) unless ActiveRecord::Base.connected?
49
- ActiveRecord::Base.connection.execute("SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;")
49
+ if ActiveRecord::Base.connection.adapter_name == "Mysql2"
50
+ ActiveRecord::Base.connection.execute("SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;")
51
+ ActiveRecord::Base.connection.execute("SET SESSION innodb_lock_wait_timeout = 1;")
52
+ end
50
53
 
51
54
  raise "Unknown format" if configuration.message_format != SIDEKIQ5_FORMAT
52
55
  @message_format = SIDEKIQ5_FORMAT
@@ -12,8 +12,8 @@ module RubyEventStore
12
12
  async: true,
13
13
  time_precision: 'ns',
14
14
  }
15
- options[:username] = params["username"]&.first if params["username"].present?
16
- options[:password] = params["password"]&.first if params["password"].present?
15
+ options[:username] = params.fetch("username").first if params.key?("username")
16
+ options[:password] = params.fetch("password").first if params.key?("password")
17
17
  @influxdb_client = InfluxDB::Client.new(**options)
18
18
  end
19
19
 
@@ -30,8 +30,8 @@ module RubyEventStore
30
30
  end
31
31
 
32
32
  def write_point(series, data)
33
- data[:timestamp] ||= Process.clock_gettime(Process::CLOCK_REALTIME, :nanosecond).to_i
34
- @influxdb_client.write_point(series, data)
33
+ data[:timestamp] = Process.clock_gettime(Process::CLOCK_REALTIME, :nanosecond)
34
+ influxdb_client.write_point(series, data)
35
35
  end
36
36
 
37
37
  attr_reader :influxdb_client
@@ -2,7 +2,7 @@ module RubyEventStore
2
2
  module Outbox
3
3
  module Metrics
4
4
  class Null
5
- def write_point_queue(status:, enqueued: 0, failed: 0)
5
+ def write_point_queue(**kwargs)
6
6
  end
7
7
  end
8
8
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module RubyEventStore
4
4
  module Outbox
5
- VERSION = "0.0.8"
5
+ VERSION = "0.0.9"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby_event_store-outbox
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arkency
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-06-25 00:00:00.000000000 Z
11
+ date: 2020-06-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ruby_event_store
@@ -38,6 +38,20 @@ dependencies:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '3.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: influxdb
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: 0.8.0
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: 0.8.0
41
55
  description:
42
56
  email:
43
57
  - dev@arkency.com