<commit_before>#!/bin/bash

LISTENER=../bin/listener

LOG=Rush_listener_$HOSTNAME.log

. ../config/test.alarm.cfg

RUSH_HOST=http://localhost:$RUSH_PORT

MANUAL=false

while getopts ":m" opt; do
  case $opt in
    m)
      MANUAL=true
      ;;
    \?)
      echo "Invalid option: -$OPTARG" >&2
      ;;
  esac
done

TEST1=true
TEST2=true
TEST3=true
TEST4=true

red='\e[91m'
endColor='\e[0m'

function stop_redis_wait {
  echo -e "\n Now STOP Redis server at $REDIS_HOST:$REDIS_PORT"
  while nc -z $REDIS_HOST $REDIS_PORT ##Wait until they are both up
  do
    sleep 1
  done
}

function start_redis_wait {
  echo -e "\n Now start redis server at $REDIS_HOST:$REDIS_PORT"
  until nc -z $REDIS_HOST $REDIS_PORT
  do
    sleep 1
  done
}

function stop_mongo_wait {
  echo -e "\n Now STOP Mongo server at $MONGO_HOST:$MONGO_PORT"
  while nc -z $MONGO_HOST $MONGO_PORT ##Wait until they are both up
  do
    sleep 1
  done
}

function start_mongo_wait {
  echo -e "\n Now start mongo server at $MONGO_HOST:$MONGO_PORT"
  until nc -z $MONGO_HOST $MONGO_PORT
  do
    sleep 1
  done
}


function kill_servers {
  if nc -z $REDIS_HOST $REDIS_PORT; then<commit_msg>upper cases for manual steps<commit_after>#!/bin/bash

LISTENER=../bin/listener

LOG=Rush_listener_$HOSTNAME.log

. ../config/test.alarm.cfg

RUSH_HOST=http://localhost:$RUSH_PORT

MANUAL=false

while getopts ":m" opt; do
  case $opt in
    m)
      MANUAL=true
      ;;
    \?)
      echo "Invalid option: -$OPTARG" >&2
      ;;
  esac
done

TEST1=true
TEST2=true
TEST3=true
TEST4=true

red='\e[91m'
endColor='\e[0m'

function stop_redis_wait {
  echo -e "\n Now STOP Redis server at $REDIS_HOST:$REDIS_PORT"
  while nc -z $REDIS_HOST $REDIS_PORT ##Wait until they are both up
  do
    sleep 1
  done
}

function start_redis_wait {
  echo -e "\n Now START Redis server at $REDIS_HOST:$REDIS_PORT"
  until nc -z $REDIS_HOST $REDIS_PORT
  do
    sleep 1
  done
}

function stop_mongo_wait {
  echo -e "\n Now STOP Mongo server at $MONGO_HOST:$MONGO_PORT"
  while nc -z $MONGO_HOST $MONGO_PORT ##Wait until they are both up
  do
    sleep 1
  done
}

function start_mongo_wait {
  echo -e "\n Now START Mongo server at $MONGO_HOST:$MONGO_PORT"
  until nc -z $MONGO_HOST $MONGO_PORT
  do
    sleep 1
  done
}


function kill_servers {
  if nc -z $REDIS_HOST $REDIS_PORT; then
{'fraction_non_alphanumeric': 0.10390725633319021, 'fraction_numerical': 0.010304851867754402, 'mean_word_length': 3.213381555153707, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4855680', 'n_tokens_mistral': 983, 'n_tokens_neox': 927, 'n_words': 261}