<commit_before># config valid only for Capistrano 3.1
lock '3.1.0'

set :bundle_bins, fetch(:bundle_bins, []).push('whenever')

set :application, 'shipit'
set :repo_url, '<EMAIL>:Shopify/shipit2.git'
set :branch, ENV['REVISION'] || ENV['BRANCH_NAME'] || 'master'

# Default deploy_to directory is /var/www/my_app
set :deploy_to, '/u/apps/shipit'
set :format, :pretty

# Default value for :pty is false
# set :pty, true

# Default value for :linked_files is []
set :linked_files, %w(config/database.yml config/secrets.yml)

# Default value for linked_dirs is []
set :linked_dirs, %w(bin data log tmp vendor/bundle public/system public/assets)

# Default value for default_env is {}
# set :default_env, { path: "/opt/ruby/bin:$PATH" }

# Default value for keep_releases is 5
set :keep_releases, 50

before 'deploy:assets:precompile', 'deploy:use_deploy_log'
before 'deploy:symlink:release', 'deploy:use_runtime_log'

after 'deploy:publishing', 'deploy:restart'

namespace :deploy do
  task :use_deploy_log do
    on roles(:app), in: :parallel do
      within release_path do
        execute(*%W(ln -nsfT #{shared_path}/deploy_log ./log))
      end
    end
  end

  task :use_runtime_log do
    on roles(:app), in: :parallel do
      within release_path do
        execute(*%W(ln -nsfT #{shared_path}/log ./log))
      end
    end
  end

  desc "Signal Thin services to restart the application"
  task :restart do
    on roles(:app), in: :parallel do
      execute "sv-sudo hup /etc/sv/shipit-thin-*"
    end
  end

  desc "Regenerate cron tasks"
  task :cron do
    on roles(:db) do
      within release_path do
        with rails_env: fetch(:rails_env) do
          execute 'whenever', '--write-crontab'
        end
      end
    end
  end

  desc "Store the deployed revision in a REVISION file"
  task :write_revision do
    on roles(:app), in: :parallel do
      within release_path do
        execute 'echo', fetch(:current_revision), '> REVISION'
      end<commit_msg>Run cron tasks as shipit user not deploy<commit_after># config valid only for Capistrano 3.1
lock '3.1.0'

set :bundle_bins, fetch(:bundle_bins, []).push('whenever')

set :application, 'shipit'
set :repo_url, '<EMAIL>:Shopify/shipit2.git'
set :branch, ENV['REVISION'] || ENV['BRANCH_NAME'] || 'master'

# Default deploy_to directory is /var/www/my_app
set :deploy_to, '/u/apps/shipit'
set :format, :pretty

# Default value for :pty is false
# set :pty, true

# Default value for :linked_files is []
set :linked_files, %w(config/database.yml config/secrets.yml)

# Default value for linked_dirs is []
set :linked_dirs, %w(bin data log tmp vendor/bundle public/system public/assets)

# Default value for default_env is {}
# set :default_env, { path: "/opt/ruby/bin:$PATH" }

# Default value for keep_releases is 5
set :keep_releases, 50

before 'deploy:assets:precompile', 'deploy:use_deploy_log'
before 'deploy:symlink:release', 'deploy:use_runtime_log'

after 'deploy:publishing', 'deploy:restart'

namespace :deploy do
  task :use_deploy_log do
    on roles(:app), in: :parallel do
      within release_path do
        execute(*%W(ln -nsfT #{shared_path}/deploy_log ./log))
      end
    end
  end

  task :use_runtime_log do
    on roles(:app), in: :parallel do
      within release_path do
        execute(*%W(ln -nsfT #{shared_path}/log ./log))
      end
    end
  end

  desc "Signal Thin services to restart the application"
  task :restart do
    on roles(:app), in: :parallel do
      execute "sv-sudo hup /etc/sv/shipit-thin-*"
    end
  end

  desc "Regenerate cron tasks"
  task :cron do
    on roles(:db) do
      within release_path do
        with rails_env: fetch(:rails_env) do
          as 'shipit' do
            execute 'whenever', '--update-crontab'
          end
        end
      end
    end
  end

  desc "Store the deployed revision in a REVISION file"
  task :write_revision do
    on roles(:app), in: :parallel do
      within release_path do
        execute 'echo', fetch(:current_revision), '> REVISION'
      end
{'fraction_non_alphanumeric': 0.11612260154497882, 'fraction_numerical': 0.00448542237727386, 'mean_word_length': 3.420704845814978, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '5852888', 'n_tokens_mistral': 1411, 'n_tokens_neox': 1341, 'n_words': 418}