From b6776e0c24245c54fb527278479d2f5343e1a594 Mon Sep 17 00:00:00 2001 From: moustachu Date: Wed, 17 Jan 2024 13:57:26 +0100 Subject: [PATCH] fix: Add missing jobs for initiatives rake tasks (#474) --- .gitignore | 2 ++ app/jobs/check_published_initiatives.rb | 7 +++++++ app/jobs/check_validating_initiatives.rb | 7 +++++++ app/jobs/notify_progress_initiatives.rb | 7 +++++++ .../devise/shared/_omniauth_buttons.html.erb | 2 +- config/sidekiq.yml | 13 +++++++++++++ 6 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 app/jobs/check_published_initiatives.rb create mode 100644 app/jobs/check_validating_initiatives.rb create mode 100644 app/jobs/notify_progress_initiatives.rb diff --git a/.gitignore b/.gitignore index 48b37409bf..a146a38cae 100644 --- a/.gitignore +++ b/.gitignore @@ -98,3 +98,5 @@ coverage/ public/sw.js* app/compiled_views/ certificate-https-local/ + +.DS_Store \ No newline at end of file diff --git a/app/jobs/check_published_initiatives.rb b/app/jobs/check_published_initiatives.rb new file mode 100644 index 0000000000..14e46fd850 --- /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 0000000000..eac6e40535 --- /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 0000000000..d8ebc0a3c0 --- /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/app/views/decidim/devise/shared/_omniauth_buttons.html.erb b/app/views/decidim/devise/shared/_omniauth_buttons.html.erb index 30b1f73def..56608e8b08 100644 --- a/app/views/decidim/devise/shared/_omniauth_buttons.html.erb +++ b/app/views/decidim/devise/shared/_omniauth_buttons.html.erb @@ -5,7 +5,7 @@
<% if provider.match?("france") %> - <%= t("devise.shared.links.sign_in_with_france_connect")%> + <%= t("devise.shared.links.sign_in_with_france_connect") %>

<%= t("decidim.omniauth.france_connect.explanation") %>

diff --git a/config/sidekiq.yml b/config/sidekiq.yml index e45a4a4ada..7e0045fea9 100644 --- a/config/sidekiq.yml +++ b/config/sidekiq.yml @@ -15,6 +15,7 @@ - reminders - active_storage_analysis - active_storage_purge + - initiatives :scheduler: :schedule: @@ -44,3 +45,15 @@ class: NotificationsDigestMailJob queue: mailers args: :weekly + CheckPublishedInitiatives: + cron: '0 1 * * *' + class: CheckPublishedInitiatives + queue: initiatives + CheckValidatingInitiatives: + cron: '0 1 * * *' + class: CheckValidatingInitiatives + queue: initiatives + NotifyProgressInitiatives: + cron: '0 1 * * *' + class: NotifyProgressInitiatives + queue: initiatives