lib/negroku/capistrano/tasks/whenever.rake in negroku-2.5.2 vs lib/negroku/capistrano/tasks/whenever.rake in negroku-2.5.3
- old
+ new
@@ -7,14 +7,19 @@
# 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: "bash -lc ':job'",
- output: "#{shared_path}/log/whenever-out.log"
+ job_template: fetch(:whenever_template),
+ output: fetch(:whenever_log),
+ environment: fetch(:whenever_environment)
}
.map{|k,v| "#{k}=#{v}"}.join("&").prepend("\"") << "\""
}
end