<commit_before>include_attribute "deploy"

default[:delayed_job] = {}
default[:delayed_job][:pool_size] = 4

case node[:platform_family]
when 'rhel', 'fedora', 'suse'
  default[:monit][:includes_dir] = '/etc/monit.d'
else
  default[:monit][:includes_dir] = '/etc/monit/conf.d'
end

node[:deploy].each do |application, deploy|
  
  default[:delayed_job][application] = {}
  default[:delayed_job][application][:path_to_script] = node[:delayed_job][:path_to_script] || 'script'
  default[:delayed_job][application][:pools] = {}
  
  # Default to node[:delayed_job][:pool_size] workers, each with empty ({}) config.
  default[:delayed_job][application][:pools][:default] = Hash[node[:delayed_job][:pool_size].times.map{|i| [i.to_s, {}] }]
  
  # Use node[:delayed_job][application][:pools][HOSTNAME] if provided.
  default[:delayed_job][application][:pool] = node[:delayed_job][application][:pools][node[:opsworks][:instance][:hostname]] || node[:delayed_job][application][:pools][:default]
  Chef::Log.debug("Set delayed_job attributes for #{application} to #{node[:delayed_job][application].to_hash.inspect}")
  
  default[:delayed_job][application][:restart_command] = "sudo monit restart -g delayed_job_#{application}_group"
  
end
<commit_msg>changing default delayed_job bin path (script folder has been dropped along with rails 2)<commit_after>include_attribute "deploy"

default[:delayed_job] = {}
default[:delayed_job][:pool_size] = 4

case node[:platform_family]
when 'rhel', 'fedora', 'suse'
  default[:monit][:includes_dir] = '/etc/monit.d'
else
  default[:monit][:includes_dir] = '/etc/monit/conf.d'
end

node[:deploy].each do |application, deploy|

  default[:delayed_job][application] = {}
  default[:delayed_job][application][:path_to_script] = node[:delayed_job][:path_to_script] || 'bin'
  default[:delayed_job][application][:pools] = {}

  # Default to node[:delayed_job][:pool_size] workers, each with empty ({}) config.
  default[:delayed_job][application][:pools][:default] = Hash[node[:delayed_job][:pool_size].times.map{|i| [i.to_s, {}] }]

  # Use node[:delayed_job][application][:pools][HOSTNAME] if provided.
  default[:delayed_job][application][:pool] = node[:delayed_job][application][:pools][node[:opsworks][:instance][:hostname]] || node[:delayed_job][application][:pools][:default]
  Chef::Log.debug("Set delayed_job attributes for #{application} to #{node[:delayed_job][application].to_hash.inspect}")

  default[:delayed_job][application][:restart_command] = "sudo monit restart -g delayed_job_#{application}_group"

end

{'fraction_non_alphanumeric': 0.1826734613876911, 'fraction_numerical': 0.0011760094080752645, 'mean_word_length': 8.313868613138686, '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': '7110268', 'n_tokens_mistral': 883, 'n_tokens_neox': 873, 'n_words': 129}