bricolage 5.15.1 → 5.15.2
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5acaeef75f7cfc4d74814c7f036d7e7a187f728f
|
4
|
+
data.tar.gz: 4ef05fb1c2b2e292a51f2c6331ceaa9a12d445e9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4569b393900821b004f84b341e9e5ce87298c6e83d8fb49719960448bac8ad6d8d59cb29ce49acc7e5e5047a0a05324170e76957928ed7ea102944835a733c09
|
7
|
+
data.tar.gz: c17dddd3e8a46e246250e746a02e9f8eaa8f335a3cbfe245ab709aa35c8e59caf1629f0636b0928bfc285f60a84968456ae7556132386a71854634e546b09054
|
@@ -43,9 +43,9 @@ module Bricolage
|
|
43
43
|
@logger.info "[#{@ds.name}] #{declare_cursor}"
|
44
44
|
@connection.exec(declare_cursor)
|
45
45
|
elsif !@cursor.nil? && cursor.nil?
|
46
|
-
raise "Cursor in use"
|
46
|
+
raise "Cannot declare new cursor. Cursor in use: #{@cursor}"
|
47
47
|
elsif @cursor != cursor
|
48
|
-
raise "
|
48
|
+
raise "Specified cursor not exists. Specified: #{cursor}, Current: #{@cursor}"
|
49
49
|
end
|
50
50
|
fetch = "fetch #{fetch_size} in #{@cursor}"
|
51
51
|
@logger.info "[#{@ds.name}] #{fetch}" if cursor.nil?
|
@@ -8,15 +8,15 @@ module Bricolage
|
|
8
8
|
class RedisDataSource < DataSource
|
9
9
|
declare_type 'redis'
|
10
10
|
|
11
|
-
def initialize(host: 'localhost', port: 6380, **
|
11
|
+
def initialize(host: 'localhost', port: 6380, **options)
|
12
12
|
@host = host
|
13
13
|
@port = port
|
14
|
-
@options =
|
14
|
+
@options = options
|
15
15
|
end
|
16
16
|
|
17
17
|
attr_reader :host
|
18
18
|
attr_reader :port
|
19
|
-
attr_reader :
|
19
|
+
attr_reader :options
|
20
20
|
|
21
21
|
def new_task
|
22
22
|
RedisTask.new(self)
|
@@ -58,22 +58,18 @@ module Bricolage
|
|
58
58
|
end
|
59
59
|
|
60
60
|
def import
|
61
|
-
results = []
|
62
61
|
@src.cursor_transaction {
|
63
62
|
read_count = 0
|
64
63
|
loop do
|
65
|
-
futures = []
|
66
64
|
ds.client.pipelined do
|
67
65
|
read_count = read_row do |row|
|
68
|
-
|
66
|
+
write_row row
|
69
67
|
end
|
70
68
|
end
|
71
|
-
results.push futures.flatten.map {|f| f.value}.all?
|
72
69
|
break if read_count == 0
|
73
70
|
end
|
74
71
|
}
|
75
72
|
@cursor = nil
|
76
|
-
results.all?
|
77
73
|
end
|
78
74
|
|
79
75
|
def read_row
|
@@ -127,7 +123,7 @@ module Bricolage
|
|
127
123
|
ds.logger.info "Key Pattern: #{prefix}<#{@key_columns.join('_')}>"
|
128
124
|
ds.logger.info "Encode: #{@encode}"
|
129
125
|
ds.logger.info "Expire: #{@expire}"
|
130
|
-
|
126
|
+
import
|
131
127
|
rescue => ex
|
132
128
|
ds.logger.error ex.backtrace.join("\n")
|
133
129
|
raise JobFailure, ex.message
|
data/lib/bricolage/version.rb
CHANGED
data/test/home/Gemfile.lock
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bricolage
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.15.
|
4
|
+
version: 5.15.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Minero Aoki
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-03-
|
11
|
+
date: 2016-03-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pg
|
@@ -209,6 +209,7 @@ files:
|
|
209
209
|
- test/home/subsys/raw-vacuum.sql.job
|
210
210
|
- test/home/subsys/rebuild.sql.job
|
211
211
|
- test/home/subsys/redis_export.job
|
212
|
+
- test/home/subsys/redis_export2.job
|
212
213
|
- test/home/subsys/search_backends.ct
|
213
214
|
- test/home/subsys/separated.job
|
214
215
|
- test/home/subsys/separated.sql
|