Merge pull request #5775 from betagouv/fix_cron_namespace
fix cron namespace
This commit is contained in:
commit
66e08ed741
1 changed files with 2 additions and 2 deletions
|
@ -3,13 +3,13 @@ namespace :jobs do
|
|||
task schedule: :environment do
|
||||
glob = Rails.root.join('app', 'jobs', '**', '*_job.rb')
|
||||
Dir.glob(glob).each { |f| require f }
|
||||
CronJob.subclasses.each(&:schedule)
|
||||
Cron::CronJob.subclasses.each(&:schedule)
|
||||
end
|
||||
|
||||
desc 'Display schedule for all cron jobs'
|
||||
task display_schedule: :environment do
|
||||
glob = Rails.root.join('app', 'jobs', '**', '*_job.rb')
|
||||
Dir.glob(glob).each { |f| require f }
|
||||
CronJob.subclasses.each(&:display_schedule)
|
||||
Cron::CronJob.subclasses.each(&:display_schedule)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue