diff --git a/app/jobs/check_published_initiatives.rb b/app/jobs/check_published_initiatives.rb new file mode 100644 index 0000000..14e46fd --- /dev/null +++ b/app/jobs/check_published_initiatives.rb @@ -0,0 +1,7 @@ +# frozen_string_literal: true + +class CheckPublishedInitiatives < ApplicationJob + def perform + system "rake decidim_initiatives:check_published" + end +end diff --git a/app/jobs/check_validating_initiatives.rb b/app/jobs/check_validating_initiatives.rb new file mode 100644 index 0000000..eac6e40 --- /dev/null +++ b/app/jobs/check_validating_initiatives.rb @@ -0,0 +1,7 @@ +# frozen_string_literal: true + +class CheckValidatingInitiatives < ApplicationJob + def perform + system "rake decidim_initiatives:check_validating" + end +end diff --git a/app/jobs/notify_progress_initiatives.rb b/app/jobs/notify_progress_initiatives.rb new file mode 100644 index 0000000..d8ebc0a --- /dev/null +++ b/app/jobs/notify_progress_initiatives.rb @@ -0,0 +1,7 @@ +# frozen_string_literal: true + +class NotifyProgressInitiatives < ApplicationJob + def perform + system "rake decidim_initiatives:notify_progress" + end +end diff --git a/config/sidekiq.yml b/config/sidekiq.yml index 8811244..06078ad 100644 --- a/config/sidekiq.yml +++ b/config/sidekiq.yml @@ -13,6 +13,7 @@ - metrics - vote_reminder - reminders + - initiatives :scheduler: :schedule: @@ -48,3 +49,15 @@ cron: '0 5 0 * * 6' # Run at 00:05 on Saturday class: SendNotificationMailWeeklyJob queue: mailers + CheckPublishedInitiatives: + cron: '0 1 * * *' + class: CheckPublishedInitiatives + queue: initiatives + CheckValidatingInitiatives: + cron: '0 1 * * *' + class: CheckValidatingInitiatives + queue: initiatives + NotifyProgressInitiatives: + cron: '0 1 * * *' + class: NotifyProgressInitiatives + queue: initiatives