services 0.2.13 → 0.2.14

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: 633721b985b22ab22c0f05134d9d596cb1c3e8e7
4
- data.tar.gz: 296c454079604408722442164aec3999a842ca54
3
+ metadata.gz: ac839c9acd73ecdeb861be1d8b484bb3c49b39b6
4
+ data.tar.gz: a00b6d2cd4e15da02bf55e90d8f18c1d250fda2a
5
5
  SHA512:
6
- metadata.gz: fd8b3a5e499a3c6ba052d6a6dd6fb84dc25be6677571aca9d8aeb6192ebb54334f3d4604cf51da3181a60c93d0b70550b5ef396dbfe9b76ac66ffdfbbf9499ee
7
- data.tar.gz: 1766463f9ab6d43dcc242dccaa2c0e6d585945f6613e59b17627bfceb99868c112ce2594d83435aff94982e9faa6059e5e07f1efa69b02bb9387c56fb1bf7baf
6
+ metadata.gz: cdbe4970cf52f2ccd1648e617bfb83483f6e3d8d47e9c183209385383975b8e51184e96f1ab0f16690de8955e6bb1fee03b12f8e74f5ab5dc179cc456c000d5a
7
+ data.tar.gz: 960d6879ba1b08c6592e724f2d8e642157d37ce6133383ab75d52daa626d2cb2daefdbdcc32a32b3d060d2808be599e9b67c5fdbc8ac106a105701541318f1ec
@@ -78,10 +78,11 @@ module Services
78
78
  end
79
79
 
80
80
  def reschedule
81
- # Convert service args to fixnums first
81
+ # Convert service args for rescheduling first
82
82
  reschedule_args = @service_args.map do |arg|
83
83
  convert_for_rescheduling arg
84
84
  end
85
+ log "Rescheduling to be executed in #{retry_delay} seconds." if self.respond_to?(:log)
85
86
  self.class.perform_in retry_delay, *reschedule_args
86
87
  end
87
88
 
@@ -90,8 +91,7 @@ module Services
90
91
  end
91
92
 
92
93
  def increase_error_count
93
- Services.configuration.redis.incr error_count_key
94
- Services.configuration.redis.setex error_count_key, retry_delay + ONE_HOUR, error_count
94
+ Services.configuration.redis.setex error_count_key, retry_delay + ONE_HOUR, error_count + 1
95
95
  end
96
96
 
97
97
  def uniqueness_key(args)
@@ -114,7 +114,7 @@ module Services
114
114
  end
115
115
 
116
116
  def retry_delay
117
- (error_count ** 3) + 5
117
+ error_count ** 3 + 5
118
118
  end
119
119
  end
120
120
  end
@@ -1,3 +1,3 @@
1
1
  module Services
2
- VERSION = '0.2.13'
2
+ VERSION = '0.2.14'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: services
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.13
4
+ version: 0.2.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Manuel Meurer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-07 00:00:00.000000000 Z
11
+ date: 2014-10-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -176,7 +176,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
176
176
  version: '0'
177
177
  requirements: []
178
178
  rubyforge_project:
179
- rubygems_version: 2.4.1
179
+ rubygems_version: 2.2.2
180
180
  signing_key:
181
181
  specification_version: 4
182
182
  summary: ''