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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 005d7855e81b35ea95f7ecc81fdf9391b422a8af
|
4
|
+
data.tar.gz: 38b6e29a5a00cdfec5a11335dc57b3f41e5185f0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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 :
|
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
|
-
|
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
|
-
|
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
|