wal 0.0.5 → 0.0.7

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 (4) hide show
  1. checksums.yaml +4 -4
  2. data/exe/wal +6 -3
  3. data/lib/wal/version.rb +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 15525cced6fec830b09643dfa43d867090a7393a41575cf463445d4b89a664f8
4
- data.tar.gz: ea86cbc0117bb0c180021cb618975ceb11df8827ca651f2626dfd2b09e9cda34
3
+ metadata.gz: f69fdfa02c0ec9015408b179140ab2086041ffc4f895e2d0cfd8f1702e32ad5b
4
+ data.tar.gz: a6bbc4b59d098e39f159875e782e174f4d2700b5bad3281979e1f25deb40ad12
5
5
  SHA512:
6
- metadata.gz: 70d0acc4046bc00f58e29f2e943cba4dd86e0aa4e7303f6cbe9c57a80fc579023194f58c11e4ee42f6f9622baf69f797babf38eb942e814697b820b380ea81d3
7
- data.tar.gz: 07b6d3496f3cc1e1c65b0880e91c84bdbd14ca1cfcbc667735f16fcce275fa8a2d148d08390736a6428d1b9b3d50a121764ffa1f4360c8b2ba348b33b6e684e9
6
+ metadata.gz: fd490b22e2db6e1a0a6e5f2b667234c3a2f8c6fc488f54bedfcb21660f2259ffbf47498f0227da72ce94ac59ee0177b2363c3fc244a8b300fde48777ee3ad79b
7
+ data.tar.gz: f7d8e93fd8a91e0e1d4d37d7fc25d5d698eadf9e145db45d4078a137e9ffc5e5ca8a9c1f3f26ee19c9e7920a863dd6482cc2322d6a81b296635ab003e8f0bb92
data/exe/wal CHANGED
@@ -33,18 +33,21 @@ if cli["watch"]
33
33
  use_temporary_slot = cli["--tmp-slot"] || false
34
34
  replication_slot = cli["--slot"]
35
35
  replication_slot = replication_slot.presence || "wal_watcher_#{SecureRandom.alphanumeric(4)}" if use_temporary_slot
36
- replicator = cli["--replicator"]&.constantize || Wal::Replicator
36
+ publications = cli["--publication"] || []
37
+ replicator = cli["--replicator"].presence&.constantize || Wal::Replicator
37
38
 
39
+ puts "Watcher started for #{replication_slot} slot (#{publications.join(", ")})"
38
40
  replicator
39
41
  .new(replication_slot:, use_temporary_slot:, db_config:)
40
- .replicate_forever(watcher, publications: cli["--publication"])
42
+ .replicate_forever(watcher, publications:)
43
+ puts "Watcher finished for #{replication_slot}"
41
44
 
42
45
  elsif cli["start"]
43
46
  workers = YAML.load_file(cli["<config-file>"])["slots"].map do |slot, config|
44
47
  watcher = config["watcher"].constantize.new
45
48
  temporary = config["temporary"] || false
46
49
  publications = config["publications"] || []
47
- replicator = config["replicator"]&.constantize || Wal::Replicator
50
+ replicator = config["replicator"].presence&.constantize || Wal::Replicator
48
51
 
49
52
  Thread.new(slot, watcher, temporary, publications) do |replication_slot, watcher, use_temporary_slot, publications|
50
53
  replication_slot = "#{replication_slot}_#{SecureRandom.alphanumeric(4)}" if use_temporary_slot
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.5"
4
+ VERSION = "0.0.7"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wal
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rodrigo Navarro