1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-01-30 19:52:20 +01:00

prepares schedule.yml to code insertion

This commit is contained in:
Nicolas Florentin 2016-05-25 12:21:38 +02:00
parent 3cf75d794f
commit 60c2813991
2 changed files with 4 additions and 1 deletions

View File

@ -14,7 +14,8 @@ Sidekiq.configure_server do |config|
schedule_file = "config/schedule.yml"
if File.exists?(schedule_file)
Sidekiq::Cron::Job.load_from_hash YAML.load_file(schedule_file)
rendered_schedule_file = ERB.new(File.read(schedule_file)).result
Sidekiq::Cron::Job.load_from_hash YAML.load(rendered_schedule_file)
end
end

View File

@ -14,3 +14,5 @@ generate_statistic:
cron: "0 1 * * *"
class: "StatisticWorker"
queue: default
<%= PluginRegistry.insert_code('yml.schedule') %>