Skip to content

Commit

Permalink
Built-in scripts should use RQ_WRITE, RQ_READ instead of RQ_PIPE
Browse files Browse the repository at this point in the history
  • Loading branch information
sodabrew committed Jul 7, 2014
1 parent 31e94d0 commit b02da9d
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion code/cleaner_script.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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 = '')
Expand Down
2 changes: 1 addition & 1 deletion code/relay_script.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions code/rq_router_script.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion code/webhook_script.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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 = '')
Expand Down

0 comments on commit b02da9d

Please sign in to comment.