start_twsgw.sh 880 B

1234567891011121314151617181920212223242526
  1. #!/bin/bash
  2. HOST=$(hostname)
  3. echo $HOST
  4. if [ $HOST == 'hkc-larryc-vm1' ]; then
  5. FINOPT_HOME=~/ironfly-workspace/finopt/src
  6. else
  7. FINOPT_HOME=~/l1304/workspace/finopt-ironfly/finopt/src
  8. fi
  9. export PYTHONPATH=$FINOPT_HOME:$PYTHONPATH
  10. #
  11. # clear all topic offsets and erased saved subscriptions
  12. python $FINOPT_HOME/comms/ibgw/tws_gateway.py -r -c -f $FINOPT_HOME/config/tws_gateway.cfg
  13. #
  14. # clear offsets in redis / reload saved subscription entries
  15. #python $FINOPT_HOME/comms/ibgw/tws_gateway.py -c -f $FINOPT_HOME/config/tws_gateway.cfg
  16. # restart gateway keep the redis offsets but erase the subscription entries
  17. #python $FINOPT_HOME/comms/ibgw/tws_gateway.py -r -f $FINOPT_HOME/config/tws_gateway.cfg
  18. # normal restart - keep the offsets and reload from saved subscription entries
  19. #python $FINOPT_HOME/comms/ibgw/tws_gateway.py -f $FINOPT_HOME/config/tws_gateway.cfg