<commit_before>#!/bin/bash

# Runs the production server. Should be ran as a daemon.
# Args:
#   $1: name of pidfile

# Bail on errors
set -e

cd /home/rmc

# Start the uwsgi server
uwsgi \
  --socket /tmp/uwsgi.sock \
  --chmod-socket 666 \
  --env FLASK_CONFIG=/home/rmc/rmc/config/flask_prod.py \
  --wsgi-file /home/rmc/rmc/server/server.wsgi \
  --callable app \
  --master \
  --workers 4 \
  --daemonize /home/rmc/logs/uwsgi.log \
  --buffer-size 32768 \
  --pidfile $1
<commit_msg>Try setting --close-on-exec on uwsgi to support multiprocessing<commit_after>#!/bin/bash

# Runs the production server. Should be ran as a daemon.
# Args:
#   $1: name of pidfile

# Bail on errors
set -e

cd /home/rmc

# Start the uwsgi server
uwsgi \
  --socket /tmp/uwsgi.sock \
  --chmod-socket 666 \
  --env FLASK_CONFIG=/home/rmc/rmc/config/flask_prod.py \
  --wsgi-file /home/rmc/rmc/server/server.wsgi \
  --callable app \
  --master \
  --workers 4 \
  --close-on-exec \
  --daemonize /home/rmc/logs/uwsgi.log \
  --buffer-size 32768 \
  --pidfile $1

{'fraction_non_alphanumeric': 0.15171755725190839, 'fraction_numerical': 0.02099236641221374, 'mean_word_length': 2.309148264984227, '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': '5124690', 'n_tokens_mistral': 459, 'n_tokens_neox': 434, 'n_words': 102}