<commit_before>include_recipe 'supervisor'

node.default['incident_bot']['config']['HUBOT_SLACK_TOKEN'] = citadel['slack/api_key']
node.default['incident_bot']['config']['HUBOT_PAGERDUTY_USER_ID'] = citadel['pagerduty/user_id']
node.default['incident_bot']['config']['HUBOT_PAGERDUTY_SERVICE_API_KEY'] = citadel['pagerduty/service_key']
node.default['incident_bot']['config']['HUBOT_PAGERDUTY_USER_ID'] = citadel['pagerduty/user_id']

hubot_name = node['incident_bot']['name']
hubot_bin = File.join(node['incident_bot']['install_dir'], 'node_modules', '.bin', 'hubot')
hubot_adapter = node['incident_bot']['adapter']

node.default['incident_bot']['config']['PATH'] = "#{node['incident_bot']['install_dir']}/node_modules/.bin:%(ENV_PATH)s"

supervisor_service 'incident_bot' do
  action [:enable, :start]
  autostart true
  autorestart true
  directory node['incident_bot']['install_dir']
  command "#{hubot_bin} -n \"#{hubot_name}\" -a #{hubot_adapter}"
  stopsignal 'TERM'
  user node['incident_bot']['user']
  startretries 3
  stdout_logfile node['incident_bot']['supervisor']['stdout_logfile']
  stdout_logfile_maxbytes node['incident_bot']['supervisor']['stdout_logfile_maxbytes']<commit_msg>fixing missed attribute set in supervisor daemon recipe<commit_after>include_recipe 'supervisor'

node.default['incident_bot']['config']['HUBOT_SLACK_TOKEN'] = citadel['slack/api_key']
node.default['incident_bot']['config']['HUBOT_PAGERDUTY_USER_ID'] = citadel['pagerduty/user_id']
node.default['incident_bot']['config']['HUBOT_PAGERDUTY_API_KEY'] = citadel['pagerduty/api_key']
node.default['incident_bot']['config']['HUBOT_PAGERDUTY_SERVICE_API_KEY'] = citadel['pagerduty/service_key']
node.default['incident_bot']['config']['HUBOT_PAGERDUTY_USER_ID'] = citadel['pagerduty/user_id']

hubot_name = node['incident_bot']['name']
hubot_bin = File.join(node['incident_bot']['install_dir'], 'node_modules', '.bin', 'hubot')
hubot_adapter = node['incident_bot']['adapter']

node.default['incident_bot']['config']['PATH'] = "#{node['incident_bot']['install_dir']}/node_modules/.bin:%(ENV_PATH)s"

supervisor_service 'incident_bot' do
  action [:enable, :start]
  autostart true
  autorestart true
  directory node['incident_bot']['install_dir']
  command "#{hubot_bin} -n \"#{hubot_name}\" -a #{hubot_adapter}"
  stopsignal 'TERM'
  user node['incident_bot']['user']
  startretries 3
  stdout_logfile node['incident_bot']['supervisor']['stdout_logfile']
  stdout_logfile_maxbytes node['incident_bot']['supervisor']['stdout_logfile_maxbytes']
{'fraction_non_alphanumeric': 0.18214144606874752, 'fraction_numerical': 0.0007902015013828526, 'mean_word_length': 11.114832535885167, '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': '4786476', 'n_tokens_mistral': 915, 'n_tokens_neox': 910, 'n_words': 106}