Sha256: e363f5724f150f82ac539a4d4597a71b8b488841a3c08f64f831621a991f0204

Contents?: true

Size: 1.24 KB

Versions: 6

Compression:

Stored size: 1.24 KB

Contents

#!/bin/sh
set -x
dir="$(cd "$(dirname $0)" && /bin/pwd)"
PATH="$dir/../bin:$PATH"
export RUBYLIB="$dir/../example:$dir/../lib"
asir="asir verbose=9 config_rb=$dir/config/asir_config.rb" 
args="$*"
args="${args:-ALL}"
# set -e

#############################

case "$args"
in
  *webrick*|*ALL*)

$asir start webrick worker
sleep 1
$asir pid webrick worker
if $asir alive webrick worker; then
  echo "alive webrick worker"
fi

ruby "$dir/asir_control_client_http.rb"
sleep 1

$asir stop webrick worker
sleep 1
$asir pid webrick worker

;;
esac

#############################

case "$args"
in
  *zmq*|*ALL*)

$asir start zmq worker
sleep 1
$asir pid zmq worker
if $asir alive zmq worker; then
  echo "alive"
fi

ruby "$dir/asir_control_client_zmq.rb"
sleep 1

$asir stop zmq worker
sleep 1
$asir pid zmq worker

;;
esac

#############################

case "$args"
in
  *resque*|*ALL*)

$asir start resque conduit
sleep 1
if $asir alive resque conduit; then
  echo "resque conduit alive"
fi
$asir start resque worker
sleep 1
$asir pid resque worker
if $asir alive resque worker; then
  echo "resque worker alive"
fi

ruby "$dir/asir_control_client_resque.rb"
sleep 1
$asir stop resque worker
sleep 1
$asir stop resque conduit

;;
esac

#############################

exit 0

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
asir-1.0.8 example/asir_control.sh
asir-1.0.7 example/asir_control.sh
asir-1.0.6 example/asir_control.sh
asir-1.0.5 example/asir_control.sh
asir-1.0.4 example/asir_control.sh
asir-1.0.1 example/asir_control.sh