Permalink
Browse files

Version 0.1.10 - More work on queueing

  • Loading branch information...
1 parent b936d24 commit 239a6f203698e7382983ebca59cf50c319d02110 @winton committed Nov 18, 2011
Showing with 4 additions and 4 deletions.
  1. +1 −1 execache.gemspec
  2. +3 −3 lib/execache.rb
View
@@ -6,7 +6,7 @@ $:.unshift lib unless $:.include?(lib)
Gem::Specification.new do |s|
s.name = "execache"
- s.version = '0.1.9'
+ s.version = '0.1.10'
s.platform = Gem::Platform::RUBY
s.authors = [ "Winton Welsh" ]
s.email = [ "mail@wintoni.us" ]
View
@@ -72,16 +72,17 @@ def initialize(yaml)
unless redis.get('execache:wait')
Thread.new do
Timeout.timeout(60) do
- redis.set('execache:wait', '1')
- redis.expire('execache:wait', 120)
request.each do |cmd_type, cmd_options|
if cmd_options['cmd']
+ redis.set('execache:wait', '1')
+ redis.expire('execache:wait', 120)
separators = options[cmd_type]['separators'] || {}
separators['group'] ||= "[END]"
separators['result'] ||= "\n"
output = `#{cmd_options['cmd']}`
output = output.split(separators['group'] + separators['result'])
output = output.collect { |r| r.split(separators['result']) }
+ redis.del('execache:wait')
end
cmd_options['groups'].each do |group|
@@ -96,7 +97,6 @@ def initialize(yaml)
end
end
end
- redis.del('execache:wait')
end
end
end

0 comments on commit 239a6f2

Please sign in to comment.