<commit_before>Capistrano::Configuration.instance.load do

  _cset(:eye_default_hooks) { true }
  _cset(:eye_config) { "config/eye.yml" }
  _cset(:eye_bin) { "bundle exec eye-patch" }
  _cset(:eye_roles) { :app }

  if fetch(:eye_default_hooks)
    after  "deploy:stop",    "eye:stop"
    after  "deploy:start",   "eye:start"
    before "deploy:restart", "eye:restart"
  end

  namespace :eye do

    desc "Start eye with the desired configuration file"
    task :start, roles: -> { fetch(:eye_roles) } do
      run "cd #{current_path} && #{fetch(:eye_bin)} l #{fetch(:eye_config)}"
    end

    desc "Stop eye and all of its monitored tasks"
    task :stop, roles: -> { fetch(:eye_roles) } do
      run "cd #{current_path} && #{fetch(:eye_bin)} stop all && #{fetch(:eye_bin)} q"
    end

    desc "Restart all tasks monitored by eye"
    task :restart, roles: -> { fetch(:eye_roles) } do
      run "cd #{current_path} && #{fetch(:eye_bin)} r all"
    end
  end
end<commit_msg>Reload eye configuration before restart on deploy<commit_after>Capistrano::Configuration.instance.load do

  _cset(:eye_default_hooks) { true }
  _cset(:eye_config) { "config/eye.yml" }
  _cset(:eye_bin) { "bundle exec eye-patch" }
  _cset(:eye_roles) { :app }

  if fetch(:eye_default_hooks)
    after  "deploy:stop",    "eye:stop"
    after  "deploy:start",   "eye:load"
    before "deploy:restart", "eye:restart"
  end

  namespace :eye do

    desc "Start eye with the desired configuration file"
    task :load, roles: -> { fetch(:eye_roles) } do
      run "cd #{current_path} && #{fetch(:eye_bin)} l #{fetch(:eye_config)}"
    end

    desc "Stop eye and all of its monitored tasks"
    task :stop, roles: -> { fetch(:eye_roles) } do
      run "cd #{current_path} && #{fetch(:eye_bin)} stop all && #{fetch(:eye_bin)} q"
    end

    desc "Restart all tasks monitored by eye"
    task :restart, roles: -> { fetch(:eye_roles) } do
      run "cd #{current_path} && #{fetch(:eye_bin)} r all"
    end
  end

  before "eye:restart", "eye:load"
end
{'fraction_non_alphanumeric': 0.15069169960474307, 'fraction_numerical': 0.0, 'mean_word_length': 3.5918367346938775, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '4376285', 'n_tokens_mistral': 765, 'n_tokens_neox': 701, 'n_words': 190}