<commit_before>#!/bin/bash

. bin/config.inc
LOCK="/tmp/compte_update_ldap.lock"
SEQ="/tmp/compte_update_ldap.seq"
if test -f $LOCK ; then
    exit 1
fi
touch $LOCK
if test -s $SEQ; then
    echo -n "&since="$(cat $SEQ | sed 's/[^0-9a-z_-]//gi') > $SINCESEQ
fi

curl -s "http://$COUCHHOST:$COUCHPORT/$COUCHBASE/_changes?feed=continuous&timeout=59000"$SINCESEQ | grep "COMPTE" | grep -v "_design" | while read ligne
do
    echo $ligne | sed 's/.*"seq"://' | sed 's/,.*//' | sed 's/"/g/' > $SEQ
    php symfony compte:ldap-update $SYMFONYTASKOPTIONS $(echo $ligne | sed 's/.*"id":"//' | sed 's/",.*//' )
done

rm $LOCK<commit_msg>Correction update ldap couchdb 2<commit_after>#!/bin/bash

. bin/config.inc
LOCK="/tmp/compte_update_ldap.lock"
SEQ="/tmp/compte_update_ldap.seq"
if test -f $LOCK ; then
    exit 1
fi
touch $LOCK
if test -s $SEQ; then
    SINCESEQ=$(echo -n "&since="$(cat $SEQ))
fi

curl -s "http://$COUCHHOST:$COUCHPORT/$COUCHBASE/_changes?feed=continuous&timeout=59000"$SINCESEQ | grep "COMPTE" | grep -v "_design" | while read ligne
do
    echo $ligne | sed 's/.*"seq"://' | sed 's/,.*//' | sed 's/"//g' > $SEQ
    php symfony compte:ldap-update $SYMFONYTASKOPTIONS $(echo $ligne | sed 's/.*"id":"//' | sed 's/",.*//' )
done

rm $LOCK
{'fraction_non_alphanumeric': 0.21136909527622097, 'fraction_numerical': 0.01200960768614892, 'mean_word_length': 3.5955882352941178, 'pattern_counts': {'":': 4, '<': 3, '<?xml version=': 0, '>': 6, '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': '346004', 'n_tokens_mistral': 559, 'n_tokens_neox': 522, 'n_words': 122}