libis-services 0.1.10 → 0.1.11

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: 5f9fe9b744e913618010de91f2b9a5fc7ef83e4b
4
- data.tar.gz: eb5635155cef852bf7e4a83f313efe1779685d2d
3
+ metadata.gz: c800ab699b1376668e4ca1b69642e2a1aecf9046
4
+ data.tar.gz: dc4340ddf71919cc675258db6635ded30847bcaf
5
5
  SHA512:
6
- metadata.gz: b747e3961f4e7ff3e090c3a3b3fd88dee467f984ac0757a936e140f9f043e940aee966d717e0d63bd0d39d56e3eb0e71f593bbacefae1fc7690dbd6503f727f4
7
- data.tar.gz: b601be79d65cd639a98dd172798096e7253a0e98beba1271a74bea7fe51ffaa107375cd1efc7f3bc7eb11ccfb9a972b4de3499fd372fa8dcf4edbd31a5c6b252
6
+ metadata.gz: 76ad17245bc4b1e81c1ecdc5bc535e7a65f67ce9eb283a492abf7be690033d6b9af153eeb418c9e2913d7ab1d254ace32d01b7177eb42462dcab3877392203c2
7
+ data.tar.gz: 4238b0012fa945da77f58073fc4449a81999a5ba2aef89511fe76471bac45d7670cb26c97330598adcccfe78bfe3d62467670cce3568928bb7a8a44a7a19d80a
@@ -13,6 +13,8 @@ require 'write_xlsx'
13
13
  require 'backports'
14
14
  require 'awesome_print'
15
15
 
16
+ require_relative '../service_error'
17
+
16
18
  module Libis
17
19
  module Services
18
20
  module Rosetta
@@ -38,7 +40,13 @@ module Libis
38
40
  # @param [String] institute
39
41
  # @return [String] PDS handle
40
42
  def login(name, passwd, institute)
41
- handle = @pds_service.login(name, passwd, institute)
43
+ handle = nil
44
+ 0.upto(3).each do |i|
45
+ handle = @pds_service.login(name, passwd, institute)
46
+ break if handle
47
+ sleep(3 ** i)
48
+ end
49
+ raise ServiceError, 'Could not login into Rosetta.' unless handle
42
50
  @producer_service.pds_handle = handle
43
51
  @deposit_service.pds_handle = handle
44
52
  @sip_service.pds_handle = handle
@@ -1,5 +1,5 @@
1
1
  module Libis
2
2
  module Services
3
- VERSION = '0.1.10'
3
+ VERSION = '0.1.11'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: libis-services
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.10
4
+ version: 0.1.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kris Dekeyser
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-12-15 00:00:00.000000000 Z
11
+ date: 2016-12-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler