From 444cc11b6bddcacea32544ea58a60c66a1625421 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Wed, 9 Mar 2022 11:29:30 +0100 Subject: [PATCH] udpated sidekiq-unique-jobs to 7.1.15 --- CHANGELOG.md | 1 + Gemfile | 2 +- Gemfile.lock | 12 ++++++++---- config/initializers/sidekiq.rb | 14 ++++++++++++++ 4 files changed, 24 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 26d49f271..98ceda75b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ - Updated react-i18next to 11.15.6 - Updated i18next to 21.6.13 - Updated i18next-icu to 2.0.3 +- Updated sidekiq-unique-jobs to 7.1.15 - Fix a bug: a sentence was not linked to a translation key - Fix a security issue: updated image_processing to 1.12.2 to fix [CVE-2022-24720](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-24720) - Fix a security issue: updated url-parse to 1.5.10 to fix [CVE-2022-0686](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-0686), [CVE-2022-0691](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-0691), [CVE-2022-0639](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-0639) and [CVE-2022-0512](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-0512) diff --git a/Gemfile b/Gemfile index a4414445a..de37be106 100644 --- a/Gemfile +++ b/Gemfile @@ -91,7 +91,7 @@ gem 'aasm' gem 'sidekiq', '>= 6.0.7' # Recurring jobs for Sidekiq gem 'sidekiq-cron' -gem 'sidekiq-unique-jobs', '~> 6.0.22' +gem 'sidekiq-unique-jobs', '~> 7.1.15' gem 'stripe', '5.29.0' diff --git a/Gemfile.lock b/Gemfile.lock index 86428d7aa..160508a7f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -66,6 +66,9 @@ GEM bindex (0.8.1) bootsnap (1.4.6) msgpack (~> 1.0) + brpoplpush-redis_script (0.1.2) + concurrent-ruby (~> 1.0, >= 1.0.5) + redis (>= 1.0, <= 5.0) builder (3.2.4) bullet (7.0.0) activesupport (>= 3.0.0) @@ -358,10 +361,11 @@ GEM sidekiq-cron (1.1.0) fugit (~> 1.1) sidekiq (>= 4.2.1) - sidekiq-unique-jobs (6.0.22) + sidekiq-unique-jobs (7.1.15) + brpoplpush-redis_script (> 0.1.1, <= 2.0.0) concurrent-ruby (~> 1.0, >= 1.0.5) - sidekiq (>= 4.0, < 7.0) - thor (~> 0) + sidekiq (>= 5.0, < 8.0) + thor (>= 0.20, < 3.0) simplecov (0.19.0) docile (~> 1.1) simplecov-html (~> 0.11) @@ -494,7 +498,7 @@ DEPENDENCIES sha3 sidekiq (>= 6.0.7) sidekiq-cron - sidekiq-unique-jobs (~> 6.0.22) + sidekiq-unique-jobs (~> 7.1.15) spring spring-watcher-listen (~> 2.0.0) stripe (= 5.29.0) diff --git a/config/initializers/sidekiq.rb b/config/initializers/sidekiq.rb index 27034b32b..33342a0b9 100644 --- a/config/initializers/sidekiq.rb +++ b/config/initializers/sidekiq.rb @@ -6,6 +6,16 @@ redis_url = "redis://#{redis_host}:6379" Sidekiq.configure_server do |config| config.redis = { url: redis_url } + config.client_middleware do |chain| + chain.add SidekiqUniqueJobs::Middleware::Client + end + + config.server_middleware do |chain| + chain.add SidekiqUniqueJobs::Middleware::Server + end + + SidekiqUniqueJobs::Server.configure(config) + # load sidekiq-cron schedule config schedule_file = 'config/schedule.yml' @@ -17,6 +27,10 @@ end Sidekiq.configure_client do |config| config.redis = { url: redis_url } + + config.client_middleware do |chain| + chain.add SidekiqUniqueJobs::Middleware::Client + end end Sidekiq::Extensions.enable_delay!