restforce-db 3.2.0 → 3.2.1
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 +4 -4
- data/lib/restforce/db/associator.rb +4 -0
- data/lib/restforce/db/initializer.rb +1 -1
- data/lib/restforce/db/version.rb +1 -1
- data/lib/restforce/db/worker.rb +8 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f63cdbd13c368d67e00032954b0b920a03bdc818
|
|
4
|
+
data.tar.gz: 686cd54d4d4c9771e70668455c50eefabc68a4f2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 726c45542d070d66fd0a9d875c06391f20c25f1c75153ac459300fee7de7df81983e46e19f20e6124c85364b9a865a85bae7384f89190c1e1efd42cb1ab80c2a
|
|
7
|
+
data.tar.gz: 041b0467c120897e7bb5363ec3632a8f5f5b301d9a0585516a296d79771fdafe4ca9330cbcb8464833a9b033b2f4dc3af28f7ae3a7edf50cf6440189bc4300bf
|
|
@@ -39,6 +39,10 @@ module Restforce
|
|
|
39
39
|
return unless database_instance && salesforce_instance
|
|
40
40
|
|
|
41
41
|
sync_associations(database_instance, salesforce_instance)
|
|
42
|
+
rescue Faraday::Error::ClientError => e
|
|
43
|
+
# This should only be tripped if `synchronized_instances` makes a
|
|
44
|
+
# request to fetch the Salesforce instance.
|
|
45
|
+
DB.logger.error(SynchronizationError.new(e, database_instance))
|
|
42
46
|
end
|
|
43
47
|
|
|
44
48
|
# Internal: Given an instance for one system, find its synchronized pair
|
|
@@ -36,7 +36,7 @@ module Restforce
|
|
|
36
36
|
|
|
37
37
|
@runner.cache_timestamp instance
|
|
38
38
|
@runner.cache_timestamp created
|
|
39
|
-
rescue ActiveRecord::ActiveRecordError => e
|
|
39
|
+
rescue ActiveRecord::ActiveRecordError, Faraday::Error::ClientError => e
|
|
40
40
|
DB.logger.error(SynchronizationError.new(e, instance))
|
|
41
41
|
end
|
|
42
42
|
|
data/lib/restforce/db/version.rb
CHANGED
data/lib/restforce/db/worker.rb
CHANGED
|
@@ -2,8 +2,13 @@ require "file_daemon"
|
|
|
2
2
|
|
|
3
3
|
module Restforce
|
|
4
4
|
|
|
5
|
+
# :nodoc:
|
|
5
6
|
module DB
|
|
6
7
|
|
|
8
|
+
# TaskMapping is a small data structure used to pass top-level task
|
|
9
|
+
# information through to a SynchronizationError when necessary.
|
|
10
|
+
TaskMapping = Struct.new(:id, :mapping)
|
|
11
|
+
|
|
7
12
|
# Restforce::DB::Worker represents the primary polling loop through which
|
|
8
13
|
# all record synchronization occurs.
|
|
9
14
|
class Worker
|
|
@@ -154,6 +159,9 @@ module Restforce
|
|
|
154
159
|
# Returns nothing.
|
|
155
160
|
def task(task_class, mapping)
|
|
156
161
|
task_class.new(mapping, runner).run(@changes)
|
|
162
|
+
rescue Faraday::Error::ClientError => e
|
|
163
|
+
task_mapping = TaskMapping.new(task_class, mapping)
|
|
164
|
+
error SynchronizationError.new(e, task_mapping)
|
|
157
165
|
end
|
|
158
166
|
|
|
159
167
|
# Internal: Has this worker been instructed to stop?
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: restforce-db
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.2.
|
|
4
|
+
version: 3.2.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Andrew Horner
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-07-
|
|
11
|
+
date: 2015-07-15 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activerecord
|