From 9006479915b7445a7c694d0e525b2d477c129dea Mon Sep 17 00:00:00 2001 From: Marc Anguera Date: Sat, 19 Oct 2024 11:26:58 +0200 Subject: [PATCH] Update to latest Sidekiq-Cron stable (#760) --- Gemfile | 2 +- Gemfile.lock | 19 ++++++++++--------- config/initializers/sidekiq.rb | 5 ----- config/schedule.yml | 4 ++-- 4 files changed, 13 insertions(+), 17 deletions(-) delete mode 100644 config/initializers/sidekiq.rb diff --git a/Gemfile b/Gemfile index 638506882..517af7c53 100644 --- a/Gemfile +++ b/Gemfile @@ -21,7 +21,7 @@ gem 'prawn', '~> 2.5.0' gem 'prawn-table', '~> 0.2.2' gem 'pg_search', '~> 2.3.5' gem 'sidekiq', '~> 6.5' -gem 'sidekiq-cron', '~> 1.9.1' +gem 'sidekiq-cron', '~> 1.12.0' gem 'aws-sdk-s3', '~> 1.94', require: false gem 'image_processing', '~> 1.12' gem 'active_storage_validations', '~> 1.1.3' diff --git a/Gemfile.lock b/Gemfile.lock index b8d4cdc54..4bfc23356 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -225,7 +225,7 @@ GEM net-smtp marcel (1.0.4) matrix (0.4.2) - method_source (1.0.0) + method_source (1.1.0) mime-types (3.5.2) mime-types-data (~> 3.2015) mime-types-data (3.2023.1205) @@ -233,14 +233,14 @@ GEM mini_mime (1.1.5) minitest (5.25.1) msgpack (1.7.2) - net-imap (0.4.10) + net-imap (0.5.0) date net-protocol net-pop (0.1.2) net-protocol net-protocol (0.2.2) timeout - net-smtp (0.4.0.1) + net-smtp (0.5.0) net-protocol netrc (0.11.0) nio4r (2.7.3) @@ -310,7 +310,7 @@ GEM thor (~> 1.0) zeitwerk (~> 2.5) rainbow (3.1.1) - rake (13.1.0) + rake (13.2.1) ransack (3.2.1) activerecord (>= 6.1.5) activesupport (>= 6.1.5) @@ -388,9 +388,10 @@ GEM connection_pool (>= 2.2.5, < 3) rack (~> 2.0) redis (>= 4.5.0, < 5) - sidekiq-cron (1.9.1) + sidekiq-cron (1.12.0) fugit (~> 1.8) - sidekiq (>= 4.2.1) + globalid (>= 1.0.1) + sidekiq (>= 6) simple_form (5.0.3) actionpack (>= 5.0) activemodel (>= 5.0) @@ -408,7 +409,7 @@ GEM activesupport (>= 5.2) sprockets (>= 3.0.0) strscan (3.1.0) - thor (1.3.1) + thor (1.3.2) tilt (2.3.0) timeout (0.4.1) ttfunk (1.8.0) @@ -431,7 +432,7 @@ GEM websocket-extensions (0.1.5) xpath (3.2.0) nokogiri (~> 1.8) - zeitwerk (2.6.13) + zeitwerk (2.7.1) PLATFORMS arm64-darwin-22 @@ -479,7 +480,7 @@ DEPENDENCIES selenium-webdriver (~> 4.16) shoulda-matchers (~> 4.4) sidekiq (~> 6.5) - sidekiq-cron (~> 1.9.1) + sidekiq-cron (~> 1.12.0) simple_form (~> 5.0.2) simplecov (~> 0.22) uglifier (~> 4.2.0) diff --git a/config/initializers/sidekiq.rb b/config/initializers/sidekiq.rb deleted file mode 100644 index c90629cc4..000000000 --- a/config/initializers/sidekiq.rb +++ /dev/null @@ -1,5 +0,0 @@ -schedule_file = 'config/schedule.yml' - -if File.exist?(schedule_file) && Sidekiq.server? - Sidekiq::Cron::Job.load_from_hash YAML.load_file(schedule_file) -end diff --git a/config/schedule.yml b/config/schedule.yml index 7116ad52d..7e85c3d5e 100644 --- a/config/schedule.yml +++ b/config/schedule.yml @@ -1,8 +1,8 @@ send_push_notifications_job: - cron: '*/5 * * * *' + cron: 'every 5 minutes' class: 'SendPushNotificationsJob' queue: cron weekly_digest: - cron: '0 9 * * 1' # every monday at 9am + cron: 'every monday at 9am' class: 'OrganizationNotifierJob' queue: cron