<commit_before>include_recipe "opsworks-resque::setup"

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

  if deploy[:application_type] != 'rails'
    Chef::Log.debug("Skipping resque::deploy application #{application} as it is not an Rails app")
    next
  end

  execute "restart resque processes for app #{application}" do
    cwd deploy[:current_path]
    command node[:resque][application][:restart_command]
    action :run
    
    only_if do 
      File.exists?(deploy[:current_path])
    end
  end

end<commit_msg>retrying restart, since we keep getting random monit errors<commit_after>include_recipe "opsworks-resque::setup"

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

  if deploy[:application_type] != 'rails'
    Chef::Log.debug("Skipping resque::deploy application #{application} as it is not an Rails app")
    next
  end

  execute "restart resque processes for app #{application}" do
    cwd deploy[:current_path]
    command node[:resque][application][:restart_command]
    action :run
    retries 2
    
    only_if do 
      File.exists?(deploy[:current_path])
    end
  end

end
{'fraction_non_alphanumeric': 0.10675182481751824, 'fraction_numerical': 0.0009124087591240876, 'mean_word_length': 4.199052132701421, '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': '609720', 'n_tokens_mistral': 344, 'n_tokens_neox': 332, 'n_words': 93}