<commit_before>#!/usr/bin/env bash
set -e

SSH_USER="jan" # user to ssh to machines with

#ssh <EMAIL> "cat /etc/redis/6379.conf | grep dbfilename;ls -d1 /var/lib/redis/6379/*.*;cat /etc/redis/6380.conf | grep dbfilename;ls -d1 /var/lib/redis/6380/*.*;"
if [ "testserver" == `hostname` ]; then
  IP1="192.168.3.11" # redis server
  IP2="172.16.58.3" # redis resque server
  FILENAME="/var/lib/redis/6379/testserver_dump.rdb"
  FILENAME_RESQUE="/var/lib/redis/6380/testserver_dump_6380.rdb"
fi

if [ "staging" == `hostname` ]; then
  IP1="88" # redis server
  IP2="88" # redis resque server
  FILENAME="/var/lib/redis/6379/staging_dump.rdb"
  FILENAME_RESQUE="/var/lib/redis/6380/staging_dump_6380.rdb"
fi

if [ "production"  == `hostname` ]; then
  IP1="88" # redis server
  IP2="88" # redis resque server
  FILENAME="/var/lib/redis/6379/production_dump.rdb"
  FILENAME_RESQUE="/var/lib/redis/6380/staging_dump_6380.rdb"
fi

#stop redis on external servers
ssh -t "$SSH_USER@$IP1" "sudo monit stop redis"
ssh -t "$SSH_USER@$IP2" "sudo monit stop redis"

#stop recalc
monit stop recalculate || exit 1

#stop resque
monit stop resque


#factlink uit
monit stop nginx || exit 1

#redis uit (kan dit met monit)
monit stop redis || exit 1
monit stop redis-6380 || exit 1
<commit_msg>Added ip's for staging<commit_after>#!/usr/bin/env bash
set -e

SSH_USER="jan" # user to ssh to machines with

#ssh <EMAIL> "cat /etc/redis/6379.conf | grep dbfilename;ls -d1 /var/lib/redis/6379/*.*;cat /etc/redis/6380.conf | grep dbfilename;ls -d1 /var/lib/redis/6380/*.*;"
if [ "testserver" == `hostname` ]; then
  IP1="192.168.3.11" # redis server
  IP2="172.16.58.3" # redis resque server
  FILENAME="/var/lib/redis/6379/testserver_dump.rdb"
  FILENAME_RESQUE="/var/lib/redis/6380/testserver_dump_6380.rdb"
fi

if [ "staging" == `hostname` ]; then
  IP1="192.168.3.11" # redis server
  IP2="192.168.127.12" # redis resque server
  FILENAME="/var/lib/redis/6379/staging_dump.rdb"
  FILENAME_RESQUE="/var/lib/redis/6380/staging_dump_6380.rdb"
fi

if [ "production"  == `hostname` ]; then
  IP1="88" # redis server
  IP2="88" # redis resque server
  FILENAME="/var/lib/redis/6379/production_dump.rdb"
  FILENAME_RESQUE="/var/lib/redis/6380/staging_dump_6380.rdb"
fi

#stop redis on external servers
ssh -t "$SSH_USER@$IP1" "sudo monit stop redis"
ssh -t "$SSH_USER@$IP2" "sudo monit stop redis"

#stop recalc
monit stop recalculate || exit 1

#stop resque
monit stop resque


#factlink uit
monit stop nginx || exit 1

#redis uit (kan dit met monit)
monit stop redis || exit 1
monit stop redis-6380 || exit 1

{'fraction_non_alphanumeric': 0.1519134132199459, 'fraction_numerical': 0.07962891379976807, 'mean_word_length': 4.1146245059288535, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 6, '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': '4593319', 'n_tokens_mistral': 1231, 'n_tokens_neox': 1082, 'n_words': 243}