<commit_before>#!/bin/bash

JOB_DIR=/var/vcap/jobs/cpi
RUN_DIR=/var/vcap/sys/run/cpi
LIB_DIR=$JOB_DIR/lib

source /var/vcap/packages/cpi-common/utils.sh

case $1 in

start)
#pid file creation done with spring boot (uses PIDFILE env var)
#pid_guard $PIDFILE "cpi-core"

mkdir -p $RUN_DIR

export JAVA_HOME=/var/vcap/packages/cpi-java
export PIDFILE=$RUN_DIR/cpi-core.pid

cd $JOB_DIR
# exec $JAVA_HOME/bin/java -XX:OnOutOfMemoryError="/var/vcap/bosh/bin/monit restart cpi" \
# -server -XX:+UseG1GC -XX:MinHeapFreeRatio=5 -XX:MaxHeapFreeRatio=25 -Xms128M -Xmx<%= p('cpi.heap_size') %> \
# -jar /var/vcap/packages/cpi-core/cloudstack-cpi-core.jar

exec $JAVA_HOME/bin/java  \
-server -XX:+UseG1GC -XX:MinHeapFreeRatio=5 -XX:MaxHeapFreeRatio=25 -Xms128M -Xmx<%= p('cpi.heap_size') %> \
-jar /var/vcap/packages/cpi-core/cloudstack-cpi-core.jar



;;

stop)
kill_and_wait $PIDFILE

;;

*)
echo "Usage: cpi-core {start|stop}"

;;
<commit_msg>force log back config file to templated config/logback.xml file<commit_after>#!/bin/bash

JOB_DIR=/var/vcap/jobs/cpi
RUN_DIR=/var/vcap/sys/run/cpi
LIB_DIR=$JOB_DIR/lib

source /var/vcap/packages/cpi-common/utils.sh

case $1 in

start)
#pid file creation done with spring boot (uses PIDFILE env var)
#pid_guard $PIDFILE "cpi-core"

mkdir -p $RUN_DIR

export JAVA_HOME=/var/vcap/packages/cpi-java
export PIDFILE=$RUN_DIR/cpi-core.pid

cd $JOB_DIR
# exec $JAVA_HOME/bin/java -XX:OnOutOfMemoryError="/var/vcap/bosh/bin/monit restart cpi" \
# -server -XX:+UseG1GC -XX:MinHeapFreeRatio=5 -XX:MaxHeapFreeRatio=25 -Xms128M -Xmx<%= p('cpi.heap_size') %> \
# -jar /var/vcap/packages/cpi-core/cloudstack-cpi-core.jar

exec $JAVA_HOME/bin/java  \
-server -XX:+UseG1GC -XX:MinHeapFreeRatio=5 -XX:MaxHeapFreeRatio=25 -Xms128M -Xmx<%= p('cpi.heap_size') %> -Dlogback.configurationFile=$JOB_DIR/config/logback.xml \
-jar /var/vcap/packages/cpi-core/cloudstack-cpi-core.jar



;;

stop)
kill_and_wait $PIDFILE

;;

*)
echo "Usage: cpi-core {start|stop}"

;;

{'fraction_non_alphanumeric': 0.1624493927125506, 'fraction_numerical': 0.015182186234817813, 'mean_word_length': 4.476454293628809, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '2112504', 'n_tokens_mistral': 906, 'n_tokens_neox': 866, 'n_words': 139}