wal 0.0.31 → 0.0.32

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ebd8285e94c341f2e9c14bc71f7c80177153eddc82ab55fe302ddfa9c8f420fc
4
- data.tar.gz: 261f5c87be8a50e074fb445c70a3ef1f04fdb95a98800d2e4408b28dda14c1cf
3
+ metadata.gz: e8f18e327f41668911967dbb73d0f6c51ab43f2b5d1d25b7c39b5f5130a04081
4
+ data.tar.gz: d0ffc96073a5faa4fd3949a02348b029bd206196fdd61c71883e5115ee53d6fa
5
5
  SHA512:
6
- metadata.gz: '0840147d093d96603562fbdd2ea081c52f8760d6eb51cb666effa904a0b5bc710fccabaefd08c56bafff2e903cd7ad227b55ab408b27c97b48387a9151778d48'
7
- data.tar.gz: 22c894fbfe102e3340b6dfd60603b42bb285178155c65a1887e44434af55e68d23ed548cbc52f4e7cabafb5e9ac3aa8a882ad60350b635645478242f04db374c
6
+ metadata.gz: effddb80b5b8093e572e65a587f5b7975cb20750aa39e7c329cb7358bd099d3bd12110648ee5b11c4dd45d791c1d050e6b0e7e82c7585c1678f9b1c532d54395
7
+ data.tar.gz: 35e21330e4da4297adcf4cbfa67ce939b5894981b352acfbc7fe8c02b1083436d037e9f7be45445445ef621ec783c84ce866f8636379609d7ff8c62e7c9fd392
data/lib/wal/runner.rb CHANGED
@@ -23,6 +23,7 @@ module Wal
23
23
  temporary = config["temporary"] || false
24
24
  publications = config["publications"] || []
25
25
  replicator_class = config["replicator"].presence&.constantize || Wal::Replicator
26
+ replicator_params = config["replicator_params"]&.transform_keys(&:to_sym) || {}
26
27
  auto_restart = config["auto_restart"].nil? || config["auto_restart"]
27
28
  max_retries = config["retries"]&.to_i || (2**32 - 1)
28
29
  backoff = config["retry_backoff"]&.to_f || 1
@@ -35,7 +36,7 @@ module Wal
35
36
 
36
37
  begin
37
38
  replicator_class
38
- .new(replication_slot:, use_temporary_slot:, db_config:)
39
+ .new(db_config:, **replicator_params, replication_slot:, use_temporary_slot:)
39
40
  .replicate_forever(Wal::LoggingWatcher.new(replication_slot, watcher), publications:)
40
41
  if auto_restart
41
42
  backoff_time = backoff_exponent ? (backoff * retries) ** backoff_exponent : backoff
@@ -44,6 +45,8 @@ module Wal
44
45
  puts "Restarting #{replication_slot}"
45
46
  redo
46
47
  end
48
+ rescue ArgumentError
49
+ raise
47
50
  rescue StandardError => err
48
51
  if retries < max_retries
49
52
  Wal.logger&.error("[#{replication_slot}] Error #{err}")
data/lib/wal/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Wal
4
- VERSION = "0.0.31"
4
+ VERSION = "0.0.32"
5
5
  end
data/rbi/wal.rbi CHANGED
@@ -7,7 +7,7 @@ module Wal
7
7
  UpdateEvent,
8
8
  DeleteEvent,
9
9
  ) }
10
- VERSION = "0.0.31"
10
+ VERSION = "0.0.32"
11
11
 
12
12
  class << self
13
13
  sig { returns(T.class_of(Logger)) }
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wal
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.31
4
+ version: 0.0.32
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rodrigo Navarro
8
8
  bindir: exe
9
9
  cert_chain: []
10
- date: 2026-01-27 00:00:00.000000000 Z
10
+ date: 2026-01-28 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: pg