<commit_before>#!/bin/bash

TARGET="${TMPDIR:-/tmp/}/gansoi-dev"

mkdir -p "${TARGET}"

cat >"${TARGET}/gansoi.yml" <<EOF
bind: "127.0.0.1:4934"
datadir: "${TARGET}"

http:
  bind: "node1.gansoi-dev.com:9002"
  hostnames:
    - "gansoi-dev.com"
    - "node1.gansoi-dev.com"
  cert: "dockerroot/gansoi-dev.com-cert.pem"
  key: "dockerroot/gansoi-dev.com-key.pem"

hosts:

  frankfurt.gansoi.com:
  london.gansoi.com:
  toronto.gansoi.com:

checks:

  gansoi http:
    agent: "http"
    arguments:
      url: "https://gansoi.com/"
    expressions:
      - "StatusCode == 200"
      - "SSLValidDays > 7"

  cluster node:
    agent: "process"
    arguments:
      name: "gansoi"
    hosts:
      - "frankfurt.gansoi.com"
      - "london.gansoi.com"
      - "toronto.gansoi.com"

EOF

export DEBUG=*

./gansoi core --config "${TARGET}/gansoi.yml" init
./gansoi core --config "${TARGET}/gansoi.yml" run<commit_msg>Removed test hosts (for now).<commit_after>#!/bin/bash

TARGET="${TMPDIR:-/tmp/}/gansoi-dev"

mkdir -p "${TARGET}"

cat >"${TARGET}/gansoi.yml" <<EOF
bind: "127.0.0.1:4934"
datadir: "${TARGET}"

http:
  bind: "node1.gansoi-dev.com:9002"
  hostnames:
    - "gansoi-dev.com"
    - "node1.gansoi-dev.com"
  cert: "dockerroot/gansoi-dev.com-cert.pem"
  key: "dockerroot/gansoi-dev.com-key.pem"

checks:

  gansoi http:
    agent: "http"
    arguments:
      url: "https://gansoi.com/"
    expressions:
      - "StatusCode == 200"
      - "SSLValidDays > 7"

EOF

export DEBUG=*

./gansoi core --config "${TARGET}/gansoi.yml" init
./gansoi core --config "${TARGET}/gansoi.yml" run
{'fraction_non_alphanumeric': 0.1901452937460518, 'fraction_numerical': 0.025268477574226154, 'mean_word_length': 2.8823529411764706, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '3412496', 'n_tokens_mistral': 713, 'n_tokens_neox': 674, 'n_words': 114}