Sha256: 59a777d9d4be681a111af835770072ff4a7f032fe19c4c6787ff42ac677be667

Contents?: true

Size: 800 Bytes

Versions: 13

Compression:

Stored size: 800 Bytes

Contents

## whenever.rb
#
# Adds whenever/capistrano specific variables and tasks

namespace :load do
  task :defaults do

    # Whenever will update the crontab only if one of the
    # server roles matches the following list
    set :whenever_roles, [:app]

    set :whenever_log, -> { "#{shared_path}/log/whenever-out.log" }

    set :whenever_template, -> { "bash -lc ':job'" }

    # Set default jobs and log
    set :whenever_variables, -> {
      {
        job_template: fetch(:whenever_template),
        output: fetch(:whenever_log),
        environment: fetch(:whenever_environment)
      }
      .map{|k,v| "#{k}=#{v}"}.join("&").prepend("\"") << "\""
    }

  end
end

namespace :negroku do

  namespace :whenever do

    define_logs(:whenever, {
      out: 'whenever-out.log'
    })

  end

end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
negroku-2.8.6 lib/negroku/capistrano/tasks/whenever.rake
negroku-2.8.5 lib/negroku/capistrano/tasks/whenever.rake
negroku-2.8.4 lib/negroku/capistrano/tasks/whenever.rake
negroku-2.8.3 lib/negroku/capistrano/tasks/whenever.rake
negroku-2.8.2 lib/negroku/capistrano/tasks/whenever.rake
negroku-2.8.1 lib/negroku/capistrano/tasks/whenever.rake
negroku-2.8.0 lib/negroku/capistrano/tasks/whenever.rake
negroku-2.7.1 lib/negroku/capistrano/tasks/whenever.rake
negroku-2.7.0 lib/negroku/capistrano/tasks/whenever.rake
negroku-2.6.0 lib/negroku/capistrano/tasks/whenever.rake
negroku-2.5.5 lib/negroku/capistrano/tasks/whenever.rake
negroku-2.5.4 lib/negroku/capistrano/tasks/whenever.rake
negroku-2.5.3 lib/negroku/capistrano/tasks/whenever.rake