test_track_rails_client 0.9.11 → 0.9.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/app/models/test_track/remote/split_registry.rb +2 -1
- data/app/models/test_track/session.rb +1 -1
- data/app/models/test_track/unsynced_assignments_notifier.rb +2 -1
- data/app/models/test_track/visitor.rb +9 -2
- data/lib/test_track.rb +1 -1
- data/lib/test_track_rails_client/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
OTI3NTIwMjQ2OTcwMDg5ZTA0NDkxNDUzYjBiYzMyMTNkODg1YzZjNg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NzQ3Yzc0YmE2MTRkYTg5NTU1MTM0MGQxNjk4ZjdjOTUwYzYxODE0Nw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MDdkNmNmZWM5NWE2MjQ5NGNhNGNjZjc4Y2JhZDUzMTYzYjZmMTIxYWM5OTU2
|
10
|
+
Y2EwODI2YThjMGIwYWY4ZmM5MDA3YzE3OWJjMjczNDI5NDc4MTgzOWMxMWIz
|
11
|
+
NDg1NTRjNTA5NGJiNjJiN2E2NTYyNDc0YzFmMDMyNGY4Y2ZmMjc=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
M2I3NWUwMWYxNTY1ZDgyMzE0MzVlZGQ2ZTU0ZjI3OWVlOWNmYjg5ODdhNzFj
|
14
|
+
NjhmNWQ5NjgyYzRjNjVkNmVmYmJiMTA0ZWNmNzhjMDJjYTAwOWYxNWFlMDQ3
|
15
|
+
MzUyYTM5MDU0NzA0MTBiMWEwODA5NDQ2MmRkZTc2Y2Y2NDU3NDk=
|
@@ -30,7 +30,8 @@ class TestTrack::Remote::SplitRegistry
|
|
30
30
|
instance.attributes
|
31
31
|
end.freeze
|
32
32
|
end
|
33
|
-
rescue *TestTrack::SERVER_ERRORS
|
33
|
+
rescue *TestTrack::SERVER_ERRORS => e
|
34
|
+
Rails.logger.error "TestTrack failed to load split registry. #{e}"
|
34
35
|
nil # if we can't get a split registry
|
35
36
|
end
|
36
37
|
end
|
@@ -17,7 +17,8 @@ class TestTrack::UnsyncedAssignmentsNotifier
|
|
17
17
|
build_notify_assignment_job(assignment).tap do |job|
|
18
18
|
begin
|
19
19
|
job.perform
|
20
|
-
rescue *TestTrack::SERVER_ERRORS
|
20
|
+
rescue *TestTrack::SERVER_ERRORS => e
|
21
|
+
Rails.logger.error "TestTrack failed to notify unsynced assignments, retrying. #{e}"
|
21
22
|
Delayed::Job.enqueue(build_notify_assignment_job(assignment))
|
22
23
|
end
|
23
24
|
end
|
@@ -70,7 +70,9 @@ class TestTrack::Visitor
|
|
70
70
|
begin
|
71
71
|
identifier = TestTrack::Remote::Identifier.create!(identifier_opts)
|
72
72
|
merge!(identifier.visitor)
|
73
|
-
rescue *TestTrack::SERVER_ERRORS
|
73
|
+
rescue *TestTrack::SERVER_ERRORS => e
|
74
|
+
Rails.logger.error "TestTrack failed to link identifier, retrying. #{e}"
|
75
|
+
|
74
76
|
# If at first you don't succeed, async it - we may not display 100% consistent UX this time,
|
75
77
|
# but subsequent requests will be better off
|
76
78
|
TestTrack::Remote::Identifier.delay.create!(identifier_opts)
|
@@ -92,6 +94,10 @@ class TestTrack::Visitor
|
|
92
94
|
@tt_offline
|
93
95
|
end
|
94
96
|
|
97
|
+
def loaded?
|
98
|
+
!offline? && @remote_visitor.present?
|
99
|
+
end
|
100
|
+
|
95
101
|
private
|
96
102
|
|
97
103
|
def assignments
|
@@ -100,7 +106,8 @@ class TestTrack::Visitor
|
|
100
106
|
|
101
107
|
def remote_visitor
|
102
108
|
@remote_visitor ||= TestTrack::Remote::Visitor.find(id) unless tt_offline?
|
103
|
-
rescue *TestTrack::SERVER_ERRORS
|
109
|
+
rescue *TestTrack::SERVER_ERRORS => e
|
110
|
+
Rails.logger.error "TestTrack failed to load remote visitor. #{e}"
|
104
111
|
@tt_offline = true
|
105
112
|
nil
|
106
113
|
end
|
data/lib/test_track.rb
CHANGED
@@ -14,7 +14,7 @@ require 'request_store'
|
|
14
14
|
module TestTrack
|
15
15
|
module_function
|
16
16
|
|
17
|
-
SERVER_ERRORS = [Faraday::TimeoutError, Her::Errors::RemoteServerError].freeze
|
17
|
+
SERVER_ERRORS = [Faraday::ConnectionFailed, Faraday::TimeoutError, Her::Errors::RemoteServerError].freeze
|
18
18
|
|
19
19
|
mattr_accessor :enabled_override
|
20
20
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: test_track_rails_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan O'Neill
|
@@ -13,7 +13,7 @@ authors:
|
|
13
13
|
autorequire:
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
|
-
date: 2016-11-
|
16
|
+
date: 2016-11-28 00:00:00.000000000 Z
|
17
17
|
dependencies:
|
18
18
|
- !ruby/object:Gem::Dependency
|
19
19
|
name: rails
|