draisine 0.7.12 → 0.7.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/draisine/partitioner.rb +9 -4
- data/lib/draisine/setup.rb +9 -0
- data/lib/draisine/version.rb +1 -1
- 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: 349388970372f28032f02e6a653fa1529a643c1b
|
4
|
+
data.tar.gz: 8bd3d6b88275f563fe3ceee8ccf1c879bde8e881
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1c266fd41d191db90dbf013f0c3c858777bbbdaeddfeece831e5c4927aa767c0551f400dcfff0c41773e66318ed5d2eea23e52a0b33f069a8365bd5c4f8bfcf9
|
7
|
+
data.tar.gz: 25c560339339969230a15611de02d05560246f13c8268348827a5bf70bb44593ef94c049f36153394082a0d50b48fc079919af4fcfa1c5a8863c7b6955bc73ce
|
data/lib/draisine/partitioner.rb
CHANGED
@@ -49,10 +49,15 @@ module Draisine
|
|
49
49
|
protected
|
50
50
|
|
51
51
|
def get_updated_ids(start_date, end_date)
|
52
|
-
mechanism.get_updated_ids(start_date, end_date)
|
53
|
-
|
54
|
-
|
55
|
-
|
52
|
+
updated_ids = mechanism.get_updated_ids(start_date, end_date)
|
53
|
+
if Draisine.poll_locally_updated_ids?
|
54
|
+
updated_ids |= model_class
|
55
|
+
.where("updated_at >= ? AND updated_at <= ?", start_date, end_date)
|
56
|
+
.uniq
|
57
|
+
.pluck(:salesforce_id)
|
58
|
+
.compact
|
59
|
+
end
|
60
|
+
updated_ids
|
56
61
|
end
|
57
62
|
|
58
63
|
def get_deleted_ids(start_date, end_date)
|
data/lib/draisine/setup.rb
CHANGED
@@ -44,6 +44,15 @@ EOM
|
|
44
44
|
@job_error_handler = handler
|
45
45
|
end
|
46
46
|
|
47
|
+
def self.poll_locally_updated_ids?
|
48
|
+
@poll_locally_updated_ids = true if @poll_locally_updated_ids.nil?
|
49
|
+
@poll_locally_updated_ids
|
50
|
+
end
|
51
|
+
|
52
|
+
def self.poll_locally_updated_ids=(value)
|
53
|
+
@poll_locally_updated_ids = value
|
54
|
+
end
|
55
|
+
|
47
56
|
def self.sync_callback
|
48
57
|
@sync_callback ||= proc {|type, salesforce_id, options| }
|
49
58
|
end
|
data/lib/draisine/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: draisine
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mark Abramov
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-02-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|