<commit_before>#!/bin/sh -e
# Copyright (C) <NAME> <<EMAIL>>
# See LICENSE.txt

### BEGIN INIT INFO
# Provides:          resque-pool-<%= @app_name %>
# Required-Start:    $local_fs $remote_fs $network
# Required-Stop:     $local_fs $remote_fs $network
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: resque-pool init script for <%= @app_name %>
# Description:       resque-pool manages the resque workers
### END INIT INFO

# configure these values here or in /etc/default/resque-pool
# make sure your pidfile here matches your monitrc
app_name="<%= @app_name %>"
pidfile="<%= @pidfile %>"
app_dir="/data/${app_name}/current"
run_as_user="deploy"
sleep_time_during_restart=5
stop_schedule="QUIT/30/INT/10/KILL/5"
bundler="/usr/bin/bundle"
environment="production"
stdout_log="${app_dir}/log/resque-pool-${app_name}.stdout.log"
stderr_log="${app_dir}/log/resque-pool-${app_name}.stderr.log"

# override above values, and set any other env variables you need
if [ -f /etc/default/resque ] ; then
  . /etc/default/resque
fi
if [ -f /etc/default/${app_name}_resque ] ; then
  . /etc/default/${app_name}_resque
fi

case "$1" in
  start)
    # I'm assuming that you are using bundler.  If you are using rip or
    # something else, you'll need to change this.  Remember to
    # keep the double-dash; e.g.: --startas CMD -- ARGS
    start-stop-daemon --start --pidfile ${pidfile} \
      --chuid ${run_as_user} --chdir ${app_dir} \
      --startas ${bundler} -- exec \
      resque-pool -d -p ${pidfile} -E ${environment} -o ${stdout_log} -e ${stderr_log}
    ;;
  reload)
    start-stop-daemon --stop --pidfile ${pidfile} --signal HUP
    ;;
  graceful-stop)
    start-stop-daemon --stop --pidfile ${pidfile} --signal QUIT
    ;;
  quick-stop)
    start-stop-daemon --stop --pidfile ${pidfile} --signal INT
    ;;
  stop)
    start-stop-daemon --stop --pidfile ${pidfile} --signal ${stop_schedule}
    ;;
  restart)
    $0 stop
    sleep ${sleep_time_during_restart}<commit_msg>fix init.d script --signal to --retry<commit_after>#!/bin/sh -e
# Copyright (C) <NAME> <<EMAIL>>
# See LICENSE.txt

### BEGIN INIT INFO
# Provides:          resque-pool-<%= @app_name %>
# Required-Start:    $local_fs $remote_fs $network
# Required-Stop:     $local_fs $remote_fs $network
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: resque-pool init script for <%= @app_name %>
# Description:       resque-pool manages the resque workers
### END INIT INFO

# configure these values here or in /etc/default/resque-pool
# make sure your pidfile here matches your monitrc
app_name="<%= @app_name %>"
pidfile="<%= @pidfile %>"
app_dir="/data/${app_name}/current"
run_as_user="deploy"
sleep_time_during_restart=5
stop_schedule="QUIT/30/INT/10/KILL/5"
bundler="/usr/bin/bundle"
environment="production"
stdout_log="${app_dir}/log/resque-pool-${app_name}.stdout.log"
stderr_log="${app_dir}/log/resque-pool-${app_name}.stderr.log"

# override above values, and set any other env variables you need
if [ -f /etc/default/resque ] ; then
  . /etc/default/resque
fi
if [ -f /etc/default/${app_name}_resque ] ; then
  . /etc/default/${app_name}_resque
fi

case "$1" in
  start)
    # I'm assuming that you are using bundler.  If you are using rip or
    # something else, you'll need to change this.  Remember to
    # keep the double-dash; e.g.: --startas CMD -- ARGS
    start-stop-daemon --start --pidfile ${pidfile} \
      --chuid ${run_as_user} --chdir ${app_dir} \
      --startas ${bundler} -- exec \
      resque-pool -d -p ${pidfile} -E ${environment} -o ${stdout_log} -e ${stderr_log}
    ;;
  reload)
    start-stop-daemon --stop --pidfile ${pidfile} --signal HUP
    ;;
  graceful-stop)
    start-stop-daemon --stop --pidfile ${pidfile} --signal QUIT
    ;;
  quick-stop)
    start-stop-daemon --stop --pidfile ${pidfile} --signal INT
    ;;
  stop)
    start-stop-daemon --stop --pidfile ${pidfile} --retry=${stop_schedule}
    ;;
  restart)
    $0 stop
    sleep ${sleep_time_during_restart}
{'fraction_non_alphanumeric': 0.15843059349391606, 'fraction_numerical': 0.007449714427613608, 'mean_word_length': 3.1958333333333333, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, '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': '1882379', 'n_tokens_mistral': 1464, 'n_tokens_neox': 1416, 'n_words': 369}