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:
parent
3cf75d794f
commit
60c2813991
@ -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
|
||||
|
||||
|
@ -14,3 +14,5 @@ generate_statistic:
|
||||
cron: "0 1 * * *"
|
||||
class: "StatisticWorker"
|
||||
queue: default
|
||||
|
||||
<%= PluginRegistry.insert_code('yml.schedule') %>
|
||||
|
Loading…
x
Reference in New Issue
Block a user