mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-04-12 02:02:31 +02: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"
|
schedule_file = "config/schedule.yml"
|
||||||
|
|
||||||
if File.exists?(schedule_file)
|
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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -14,3 +14,5 @@ generate_statistic:
|
|||||||
cron: "0 1 * * *"
|
cron: "0 1 * * *"
|
||||||
class: "StatisticWorker"
|
class: "StatisticWorker"
|
||||||
queue: default
|
queue: default
|
||||||
|
|
||||||
|
<%= PluginRegistry.insert_code('yml.schedule') %>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user