td 0.10.70 → 0.10.71
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +6 -0
- data/README.rdoc +1 -1
- data/lib/td/command/bulk_import.rb +14 -4
- data/lib/td/version.rb +1 -1
- metadata +2 -8
data/ChangeLog
CHANGED
data/README.rdoc
CHANGED
@@ -33,7 +33,7 @@ You need to authorize the account, before executing any other commands.
|
|
33
33
|
|
34
34
|
== Mac OS X
|
35
35
|
|
36
|
-
Disable RVM and
|
36
|
+
Disable RVM or rbenv and use system ruby (/usr/bin/ruby).
|
37
37
|
And then run following commands:
|
38
38
|
|
39
39
|
$ sudo gem install bundler
|
@@ -162,12 +162,20 @@ module Command
|
|
162
162
|
|
163
163
|
unless errors.empty?
|
164
164
|
$stderr.puts "failed to upload #{errors.size} files."
|
165
|
+
$stderr.puts "backtraces:"
|
165
166
|
errors.each {|(ifname,ex)|
|
166
167
|
$stderr.puts " #{ifname}: #{ex}"
|
167
168
|
ex.backtrace.each {|bt|
|
168
|
-
$stderr.puts " #{ifname}: #{
|
169
|
+
$stderr.puts " #{ifname}: #{bt}"
|
169
170
|
}
|
170
171
|
}
|
172
|
+
$stderr.puts "files:"
|
173
|
+
ifnames = errors.map {|(ifname,ex)| ifname }
|
174
|
+
ifnames.each {|ifname|
|
175
|
+
$stderr.puts " #{ifname}"
|
176
|
+
}
|
177
|
+
$stderr.puts "You can retry uploading by following command:"
|
178
|
+
$stderr.puts "td bulk_import:upload_parts #{name} #{ifnames.map {|ifname| "'#{ifname}'" }.join(' ')}"
|
171
179
|
exit 1
|
172
180
|
end
|
173
181
|
|
@@ -495,14 +503,16 @@ module Command
|
|
495
503
|
|
496
504
|
private
|
497
505
|
def bulk_import_upload_impl(name, part_name, io, size, retry_limit, retry_wait)
|
506
|
+
retry_count = 0
|
498
507
|
begin
|
499
508
|
client = get_client
|
500
509
|
client.bulk_import_upload_part(name, part_name, io, size)
|
501
510
|
rescue
|
502
|
-
if retry_limit
|
503
|
-
|
511
|
+
if retry_limit >= retry_count
|
512
|
+
retry_count += 1
|
504
513
|
$stderr.write "#{$!}; retrying '#{part_name}'...\n"
|
505
|
-
|
514
|
+
w = (retry_count ** 1.5) * retry_wait
|
515
|
+
sleep w
|
506
516
|
retry
|
507
517
|
end
|
508
518
|
raise
|
data/lib/td/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: td
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.10.
|
4
|
+
version: 0.10.71
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-02-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: msgpack
|
@@ -236,18 +236,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
236
236
|
- - ! '>='
|
237
237
|
- !ruby/object:Gem::Version
|
238
238
|
version: '0'
|
239
|
-
segments:
|
240
|
-
- 0
|
241
|
-
hash: -3004606412038514569
|
242
239
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
243
240
|
none: false
|
244
241
|
requirements:
|
245
242
|
- - ! '>='
|
246
243
|
- !ruby/object:Gem::Version
|
247
244
|
version: '0'
|
248
|
-
segments:
|
249
|
-
- 0
|
250
|
-
hash: -3004606412038514569
|
251
245
|
requirements: []
|
252
246
|
rubyforge_project:
|
253
247
|
rubygems_version: 1.8.23
|