execache 0.1.9 → 0.1.10
Sign up to get free protection for your applications and to get access to all the features.
- data/execache.gemspec +1 -1
- data/lib/execache.rb +3 -3
- metadata +7 -7
data/execache.gemspec
CHANGED
data/lib/execache.rb
CHANGED
@@ -72,16 +72,17 @@ class Execache
|
|
72
72
|
unless redis.get('execache:wait')
|
73
73
|
Thread.new do
|
74
74
|
Timeout.timeout(60) do
|
75
|
-
redis.set('execache:wait', '1')
|
76
|
-
redis.expire('execache:wait', 120)
|
77
75
|
request.each do |cmd_type, cmd_options|
|
78
76
|
if cmd_options['cmd']
|
77
|
+
redis.set('execache:wait', '1')
|
78
|
+
redis.expire('execache:wait', 120)
|
79
79
|
separators = options[cmd_type]['separators'] || {}
|
80
80
|
separators['group'] ||= "[END]"
|
81
81
|
separators['result'] ||= "\n"
|
82
82
|
output = `#{cmd_options['cmd']}`
|
83
83
|
output = output.split(separators['group'] + separators['result'])
|
84
84
|
output = output.collect { |r| r.split(separators['result']) }
|
85
|
+
redis.del('execache:wait')
|
85
86
|
end
|
86
87
|
|
87
88
|
cmd_options['groups'].each do |group|
|
@@ -96,7 +97,6 @@ class Execache
|
|
96
97
|
end
|
97
98
|
end
|
98
99
|
end
|
99
|
-
redis.del('execache:wait')
|
100
100
|
end
|
101
101
|
end
|
102
102
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: execache
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.10
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2011-11-18 00:00:00.000000000Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
16
|
-
requirement: &
|
16
|
+
requirement: &70107531472880 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '1.0'
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70107531472880
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: redis
|
27
|
-
requirement: &
|
27
|
+
requirement: &70107531472340 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ~>
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: 2.2.2
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70107531472340
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: yajl-ruby
|
38
|
-
requirement: &
|
38
|
+
requirement: &70107531471860 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ~>
|
@@ -43,7 +43,7 @@ dependencies:
|
|
43
43
|
version: 1.0.0
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70107531471860
|
47
47
|
description: Run commands in parallel and cache the output. Redis queues jobs and
|
48
48
|
stores the result.
|
49
49
|
email:
|