<commit_before>#!/bin/bash

FLASKDIR=$(readlink -e "${0%/*}")
APP_DIR="$(dirname "$FLASKDIR")"

echo "Starting $app_name"
echo "$FLASKDIR"
echo "$(dirname $0)/config/settings.ini"
echo $APP_DIR
. $APP_DIR/config/settings.ini

export HTTP_PROXY="'$proxy_http'"
export HTTPS_PROXY="'$proxy_https'"

# activate the virtualenv
source $FLASKDIR/$venv_dir/bin/activate

cd $FLASKDIR

# Start your gunicorn
exec gunicorn  wsgi:app --error-log $APP_DIR/var/log/gn_errors.log --pid="${app_name}.pid" -w "${gun_num_workers}"  -b "${gun_host}:${gun_port}"  -n "${app_name}"<commit_msg>gunicorn_start: set proxy seulement si renseigné<commit_after>#!/bin/bash

FLASKDIR=$(readlink -e "${0%/*}")
APP_DIR="$(dirname "$FLASKDIR")"

echo "Starting $app_name"
echo "$FLASKDIR"
echo "$(dirname $0)/config/settings.ini"
echo $APP_DIR
. $APP_DIR/config/settings.ini


if [ ! -z "$proxy_http" ] || [ ! -z "$proxy_https" ]
then
    echo "\$proxy_http is NOT empty"
    export HTTP_PROXY="'$proxy_http'"
    export HTTPS_PROXY="'$proxy_https'"
fi



# activate the virtualenv
source $FLASKDIR/$venv_dir/bin/activate

cd $FLASKDIR

# Start your gunicorn
exec gunicorn  wsgi:app --error-log $APP_DIR/var/log/gn_errors.log --pid="${app_name}.pid" -w "${gun_num_workers}"  -b "${gun_host}:${gun_port}"  -n "${app_name}"
{'fraction_non_alphanumeric': 0.18653250773993807, 'fraction_numerical': 0.0030959752321981426, 'mean_word_length': 5.307317073170732, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '6926988', 'n_tokens_mistral': 507, 'n_tokens_neox': 492, 'n_words': 102}