rate_limited_scheduler 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/lib/rate_limited_scheduler.rb +8 -3
- metadata +7 -9
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: ee122684c60b4920ef3efb98bef84d20cd09d96e
|
4
|
+
data.tar.gz: 112b66f163cb439798b7f09aa6b68c6a4fbdf4d9
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: f68886ba7e11b637a171f7321d9cc70933b54386cd932ed975762e27449cf1fa44ea0243bd7f8ca35736eeb5938378b73331ea54ae29de8c3bcfa0ce58e0ac63
|
7
|
+
data.tar.gz: c938a49dd5a9a8fb152c91f47e08f66f40c2a60ce621358a1c259990e5a873ea8a4a302e3d1f0c1f04bc864081b1412e87a5ccc55721426915f61e57461fa665
|
@@ -35,9 +35,14 @@ class RateLimitedScheduler
|
|
35
35
|
|
36
36
|
def within_constraints(&block)
|
37
37
|
start_execution
|
38
|
-
|
39
|
-
|
40
|
-
|
38
|
+
|
39
|
+
begin
|
40
|
+
yield
|
41
|
+
rescue Exception => e
|
42
|
+
raise e
|
43
|
+
ensure
|
44
|
+
stop_execution
|
45
|
+
end
|
41
46
|
end
|
42
47
|
|
43
48
|
def count_active_executions
|
metadata
CHANGED
@@ -1,15 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rate_limited_scheduler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.0.4
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Robert Strobl
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2013-
|
11
|
+
date: 2013-08-22 00:00:00.000000000 Z
|
13
12
|
dependencies: []
|
14
13
|
description: This rate-limited scheduler is made for requests to APIs with sensitive,
|
15
14
|
time-critical access restrictions which means that even limits with short time intervals
|
@@ -23,27 +22,26 @@ files:
|
|
23
22
|
- lib/rate_limited_scheduler.rb
|
24
23
|
homepage: http://github.com/rstrobl/rate_limited_scheduler
|
25
24
|
licenses: []
|
25
|
+
metadata: {}
|
26
26
|
post_install_message:
|
27
27
|
rdoc_options: []
|
28
28
|
require_paths:
|
29
29
|
- lib
|
30
30
|
required_ruby_version: !ruby/object:Gem::Requirement
|
31
|
-
none: false
|
32
31
|
requirements:
|
33
|
-
- -
|
32
|
+
- - '>='
|
34
33
|
- !ruby/object:Gem::Version
|
35
34
|
version: '0'
|
36
35
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
37
|
-
none: false
|
38
36
|
requirements:
|
39
|
-
- -
|
37
|
+
- - '>='
|
40
38
|
- !ruby/object:Gem::Version
|
41
39
|
version: '0'
|
42
40
|
requirements: []
|
43
41
|
rubyforge_project:
|
44
|
-
rubygems_version:
|
42
|
+
rubygems_version: 2.0.3
|
45
43
|
signing_key:
|
46
|
-
specification_version:
|
44
|
+
specification_version: 4
|
47
45
|
summary: A Redis-based rate-limited scheduler for requests to APIs with sensitive
|
48
46
|
and time-critical access restrictions
|
49
47
|
test_files: []
|