salesforce_streamer 0.4.1 → 0.5.0
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eff82bf75f314377e4d2e28b6dba4f4ef24ce44203559628036b1db8c2902348
|
4
|
+
data.tar.gz: dfa56f925fa54697be822a7a4fa5ea05729048700a31f4883ff7b596a5b8898c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d988b2783a28c3f9f1a5ffa81d15db40d27edf151b6d138e4ba5824af30a77c3fa1ecfa1302ba58d517515216789f386f9311c0e403fc549a4dcac978e25e81f
|
7
|
+
data.tar.gz: f15c679b13be777e89a2cd95723403f4716e35dd35ef8920ee1571492a7e1ae3feb161975810ea93688814ceb7b3d95e9a82b720d31be48c5b1b24b4df20712d
|
data/Gemfile.lock
CHANGED
data/lib/salesforce_streamer.rb
CHANGED
@@ -7,6 +7,7 @@ require 'forwardable'
|
|
7
7
|
|
8
8
|
require 'salesforce_streamer/configuration'
|
9
9
|
require 'salesforce_streamer/errors'
|
10
|
+
require 'salesforce_streamer/replay_id_error_extension'
|
10
11
|
require 'salesforce_streamer/log'
|
11
12
|
require 'salesforce_streamer/push_topic'
|
12
13
|
require 'salesforce_streamer/topic_manager'
|
@@ -0,0 +1,13 @@
|
|
1
|
+
module SalesforceStreamer
|
2
|
+
class ReplayIdErrorExtension
|
3
|
+
REPLAY_ERROR_REGEX = /^400::The replayId /.freeze
|
4
|
+
|
5
|
+
def incoming(message, callback)
|
6
|
+
if message['error']&.match?(REPLAY_ERROR_REGEX)
|
7
|
+
fail ReplayIdError, message['error']
|
8
|
+
end
|
9
|
+
|
10
|
+
callback.call message
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -24,7 +24,11 @@ module SalesforceStreamer
|
|
24
24
|
end
|
25
25
|
|
26
26
|
def client
|
27
|
-
|
27
|
+
return @client if @client
|
28
|
+
@client = Restforce.new
|
29
|
+
@client.authenticate!
|
30
|
+
@client.faye.add_extension ReplayIdErrorExtension.new
|
31
|
+
@client
|
28
32
|
end
|
29
33
|
|
30
34
|
def start_em
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: salesforce_streamer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Scott Serok
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-12-
|
11
|
+
date: 2019-12-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faye
|
@@ -154,6 +154,7 @@ files:
|
|
154
154
|
- lib/salesforce_streamer/message_receiver.rb
|
155
155
|
- lib/salesforce_streamer/push_topic.rb
|
156
156
|
- lib/salesforce_streamer/redis_replay.rb
|
157
|
+
- lib/salesforce_streamer/replay_id_error_extension.rb
|
157
158
|
- lib/salesforce_streamer/replay_persistence.rb
|
158
159
|
- lib/salesforce_streamer/salesforce_client.rb
|
159
160
|
- lib/salesforce_streamer/server.rb
|