<commit_before>#!/bin/sh

host="$(echo ${MONGO_HOST} | cut -d':' -f1)"

port="$(echo ${MONGO_HOST} | cut -d':' -f2)"

export MONGO_URL="mongodb://${MONGO_HOST}/${MONGO_DATABASE}"

wait-for-it.sh -h "${host}" -p "${port}" -t 90 -- >&2 echo "MongoDB is ready"

node main.js

<commit_msg>Run node main.js with retries<commit_after>#!/bin/sh

host="$(echo ${MONGO_HOST} | cut -d':' -f1)"

port="$(echo ${MONGO_HOST} | cut -d':' -f2)"

export MONGO_URL="mongodb://${MONGO_HOST}/${MONGO_DATABASE}"

wait-for-it.sh -h "${host}" -p "${port}" -t 90 -- >&2 echo "MongoDB is ready"

n=0
until [ ${n} -ge 5 ]; do
  node main.js && break
  n=$[$n + 1]
  info "retrying in 1 sec"
  sleep 1
done

{'fraction_non_alphanumeric': 0.2422907488986784, 'fraction_numerical': 0.022026431718061675, 'mean_word_length': 3.769230769230769, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '5502398', 'n_tokens_mistral': 320, 'n_tokens_neox': 289, 'n_words': 75}