From b02da9d9db9d3902a29d392921fcff0a7269e849 Mon Sep 17 00:00:00 2001 From: Aaron Stone Date: Mon, 7 Jul 2014 01:54:24 -0700 Subject: [PATCH] Built-in scripts should use RQ_WRITE, RQ_READ instead of RQ_PIPE --- code/cleaner_script.rb | 2 +- code/relay_script.rb | 2 +- code/rq_router_script.rb | 4 ++-- code/webhook_script.rb | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/code/cleaner_script.rb b/code/cleaner_script.rb index d85290b..f9ab608 100755 --- a/code/cleaner_script.rb +++ b/code/cleaner_script.rb @@ -8,7 +8,7 @@ require 'code/hashdir' # Setup a global binding so the GC doesn't close the file -$RQ_IO = IO.for_fd(ENV['RQ_PIPE'].to_i) +$RQ_IO = IO.for_fd(ENV['RQ_WRITE'].to_i) # IO tower to RQ mgr process def write_status(state, mesg = '') diff --git a/code/relay_script.rb b/code/relay_script.rb index 9bc0bb0..abe522d 100755 --- a/code/relay_script.rb +++ b/code/relay_script.rb @@ -19,7 +19,7 @@ def log(mesg) log(Dir.pwd.inspect) # Setup a global binding so the GC doesn't close the file -$RQ_IO = IO.for_fd(ENV['RQ_PIPE'].to_i) +$RQ_IO = IO.for_fd(ENV['RQ_WRITE'].to_i) # Had to use \n # I tried to use \000 but bash barfed on me diff --git a/code/rq_router_script.rb b/code/rq_router_script.rb index 81b9b3d..135e0e8 100755 --- a/code/rq_router_script.rb +++ b/code/rq_router_script.rb @@ -31,8 +31,8 @@ module Alarm Dir.chdir("#{File.dirname(__FILE__)}") # Setup a global binding so the GC doesn't close the file -$RQ_IO = IO.for_fd(3) -$RQ_RESULT_IO = IO.for_fd(4) +$RQ_IO = IO.for_fd(ENV['RQ_WRITE'].to_i) +$RQ_RESULT_IO = IO.for_fd(ENV['RQ_READ'].to_i) # IO tower to RQ mgr process def write_status(state, mesg) diff --git a/code/webhook_script.rb b/code/webhook_script.rb index d86646d..76139c1 100755 --- a/code/webhook_script.rb +++ b/code/webhook_script.rb @@ -4,7 +4,7 @@ require 'uri' # Setup a global binding so the GC doesn't close the file -$RQ_IO = IO.for_fd(ENV['RQ_PIPE'].to_i) +$RQ_IO = IO.for_fd(ENV['RQ_WRITE'].to_i) # IO tower to RQ mgr process def write_status(state, mesg = '')