evt-event_store-http 0.0.0.0 → 0.0.1.0

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
  SHA1:
3
- metadata.gz: 6d7bca7367ca57a54b68cb4c3d83dee13eee09aa
4
- data.tar.gz: d05d8c2d740c53b428b7ce446de231d8489e26a9
3
+ metadata.gz: 005d7855e81b35ea95f7ecc81fdf9391b422a8af
4
+ data.tar.gz: 38b6e29a5a00cdfec5a11335dc57b3f41e5185f0
5
5
  SHA512:
6
- metadata.gz: 2aff6940e662a82b5600b3c614b3ffa1d8493c6b8bd3b391a5648b9c765ce0fa5d9ddd9fddfde6063bd210c7eb2d577328abeaf845f28b38fe7a666fdcbf11dc
7
- data.tar.gz: c09751131798df128ff02926714a52b750dcf21d854616668abe6bc61d5e42d8fb4338ce0f7e0cc88cf4404cd652353fe7f0ea0bbbf38fbad2d93552bc3d9ddb
6
+ metadata.gz: f7f58b59e84fc40b51166cf3950ea0b108d5e8e9ed527e8398a29679e28c67db01cdb7ae42148d58e31dee6837a7e77a65c81c08168b0ac6df9bd68e4adfdb48
7
+ data.tar.gz: db2d76caa4dd4b61316628fc624e8a000e2c2589c7dcd49444f8f34cdba10ff55241012753cd32d76b3ba82da06a90b4337136dd3aab3716a46dcf2a267902e3
@@ -17,8 +17,6 @@ module EventStore
17
17
 
18
18
  cluster_status = Gossip.(connection: net_http)
19
19
 
20
- cluster_status.leader ||= cluster_status.unknown.first
21
-
22
20
  if cluster_status.leader.nil?
23
21
  error_message = "Leader is unavailable (Host: #{host}, Port: #{port})"
24
22
  logger.error { error_message }
@@ -10,7 +10,7 @@ module EventStore
10
10
  initializer :telemetry_sink
11
11
 
12
12
  attr_accessor :body_embed_enabled
13
- attr_accessor :long_poll_enabled
13
+ attr_accessor :long_poll_duration
14
14
  attr_accessor :rich_embed_enabled
15
15
 
16
16
  dependency :telemetry, ::Telemetry
@@ -50,8 +50,17 @@ module EventStore
50
50
  end
51
51
  end
52
52
 
53
- def enable_long_poll
54
- self.long_poll_enabled = true
53
+ def enable_long_poll(duration=nil)
54
+ duration ||= HTTP::ReadStream::Defaults.long_poll_duration
55
+
56
+ self.long_poll_duration = duration
57
+ end
58
+
59
+ def long_poll_duration?(duration=nil)
60
+ return false if long_poll_duration.nil?
61
+ return true if duration.nil?
62
+
63
+ long_poll_duration == duration
55
64
  end
56
65
 
57
66
  def embed_rich
@@ -70,7 +79,6 @@ module EventStore
70
79
  @streams ||= {}
71
80
  end
72
81
 
73
- alias_method :long_poll_enabled?, :long_poll_enabled
74
82
  alias_method :rich_embed_enabled?, :rich_embed_enabled
75
83
  alias_method :body_embed_enabled?, :body_embed_enabled
76
84
  end
@@ -77,8 +77,10 @@ module EventStore
77
77
  end
78
78
  end
79
79
 
80
- def enable_long_poll
81
- self.long_poll_duration = Defaults.long_poll_duration
80
+ def enable_long_poll(duration=nil)
81
+ duration ||= Defaults.long_poll_duration
82
+
83
+ self.long_poll_duration = duration
82
84
  end
83
85
 
84
86
  def embed_rich
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: evt-event_store-http
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.0.0
4
+ version: 0.0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - The Eventide Project