<commit_before>#!/bin/bash


main() {
    cd /opt/chiminey/current


    if grep --quiet SECRET_KEY /opt/chiminey/current/chiminey/settings.py; then
        echo Secret key exists
    else
        echo Generating new secret key
        python -c "import os; from random import choice; key_line = '%sSECRET_KEY=\"%s\"  # generated from build.sh\n' % ('from chiminey.settings_changeme import * \n\n' if not os.path.isfile('chiminey/settings.py') else '', ''.join([choice('abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*(-_=+)') for i in range(50)])); f=open('/opt/chiminey/current/chiminey/settings.py', 'a+'); f.write(key_line); f.close()"
    fi


    # need to sleep to make sure that db is ready before celery runs
    # there must be a better way of doing this...
    echo sleeping...
    sleep 20

    log_level=${CELERY_LOG_LEVEL:WARN}
    queue=${CELERY_QUEUE}
    host_name=`hostname`

    function clean_up {

        echo cleaning up...
        # rm -vf /var/run/celery/w1_w1\@$host_name.pid
        # rm -vf /var/run/celery/w2_w2\@$host_name.pid
        # rm -vf /var/run/celery/w3_w3\@$host_name.pid
        # rm -vf /var/run/celery/w4_w4\@$host_name.pid
        rm -vf /var/run/celery/$host_name.pid
        

    }
<commit_msg>used wildcard for pid deletion<commit_after>#!/bin/bash


main() {
    cd /opt/chiminey/current


    if grep --quiet SECRET_KEY /opt/chiminey/current/chiminey/settings.py; then
        echo Secret key exists
    else
        echo Generating new secret key
        python -c "import os; from random import choice; key_line = '%sSECRET_KEY=\"%s\"  # generated from build.sh\n' % ('from chiminey.settings_changeme import * \n\n' if not os.path.isfile('chiminey/settings.py') else '', ''.join([choice('abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*(-_=+)') for i in range(50)])); f=open('/opt/chiminey/current/chiminey/settings.py', 'a+'); f.write(key_line); f.close()"
    fi


    # need to sleep to make sure that db is ready before celery runs
    # there must be a better way of doing this...
    echo sleeping...
    sleep 20

    log_level=${CELERY_LOG_LEVEL:WARN}
    queue=${CELERY_QUEUE}
    host_name=`hostname`

    function clean_up {

        echo cleaning up...
        # rm -vf /var/run/celery/w1_w1\@$host_name.pid
        # rm -vf /var/run/celery/w2_w2\@$host_name.pid
        # rm -vf /var/run/celery/w3_w3\@$host_name.pid
        # rm -vf /var/run/celery/w4_w4\@$host_name.pid
        rm -vf /var/run/celery/*.pid
        

    }

{'fraction_non_alphanumeric': 0.14665592264302982, 'fraction_numerical': 0.017727639000805803, 'mean_word_length': 2.667651403249631, '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': '6518954', 'n_tokens_mistral': 976, 'n_tokens_neox': 908, 'n_words': 204}