From 54b74bf8ef020eb998794175a67c903d6c276ded Mon Sep 17 00:00:00 2001 From: yuenmichelle1 Date: Wed, 22 May 2024 13:55:29 -0500 Subject: [PATCH 1/9] replace sidetiq with sidekiq cron --- .gitignore | 1 + Gemfile | 2 +- Gemfile.lock | 36 ++++++--------------- app/workers/concerns/digest_email_worker.rb | 5 --- app/workers/concerns/expiry_worker.rb | 2 -- app/workers/daily_digest_email_worker.rb | 5 --- app/workers/weekly_digest_email_worker.rb | 5 --- config/initializers/sidekiq.rb | 8 +++-- config/routes.rb | 1 + config/schedule.yml | 36 +++++++++++++++++++++ 10 files changed, 55 insertions(+), 46 deletions(-) create mode 100644 config/schedule.yml diff --git a/.gitignore b/.gitignore index fef6d0b6..e4059f03 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ /log/*.log /tmp /config/*.yml +!/config/schedule.yml /.rvmrc /coverage **.orig diff --git a/Gemfile b/Gemfile index 7970d935..7e73a41d 100644 --- a/Gemfile +++ b/Gemfile @@ -18,7 +18,7 @@ gem 'restpack_serializer', git: 'https://github.com/zooniverse/restpack_serializ gem 'schema_plus_pg_indexes', '~> 0.1.12' gem 'sidekiq', '< 6' gem 'sidekiq-congestion', '~> 0.1.0' -gem 'sidetiq', '~> 0.7.2' +gem 'sidekiq-cron' gem 'spring', '~> 1.7.1', group: :development gem 'zoo_stream', '~> 1.0' diff --git a/Gemfile.lock b/Gemfile.lock index d61f37e0..1ccbd1da 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -57,23 +57,6 @@ GEM aws-sdk-core (= 2.3.7) benchmark-ips (2.6.1) builder (3.2.4) - celluloid (0.17.3) - celluloid-essentials - celluloid-extras - celluloid-fsm - celluloid-pool - celluloid-supervision - timers (>= 4.1.1) - celluloid-essentials (0.20.5) - timers (>= 4.1.1) - celluloid-extras (0.20.5) - timers (>= 4.1.1) - celluloid-fsm (0.20.5) - timers (>= 4.1.1) - celluloid-pool (0.20.5) - timers (>= 4.1.1) - celluloid-supervision (0.20.6) - timers (>= 4.1.1) codeclimate-test-reporter (0.5.0) simplecov (>= 0.7.1, < 1.0.0) coderay (1.1.2) @@ -88,6 +71,8 @@ GEM diff-lcs (1.2.5) docile (1.1.5) erubis (2.7.0) + et-orbi (1.2.11) + tzinfo factory_girl (4.7.0) activesupport (>= 3.0.0) factory_girl_rails (4.7.0) @@ -99,6 +84,9 @@ GEM faraday (>= 0.7.4, < 1.0) ffi (1.9.25) formatador (0.2.5) + fugit (1.11.0) + et-orbi (~> 1, >= 1.2.11) + raabro (~> 1.4) globalid (0.4.2) activesupport (>= 4.2.0) guard (2.14.0) @@ -116,11 +104,9 @@ GEM guard-compat (~> 1.1) rspec (>= 2.99.0, < 4.0) hashdiff (0.3.7) - hitimes (1.3.0) honeybadger (4.5.6) i18n (0.9.5) concurrent-ruby (~> 1.0) - ice_cube (0.14.0) its-it (1.3.0) jmespath (1.6.1) json (1.8.6) @@ -183,6 +169,7 @@ GEM nio4r (~> 2.0) pundit (1.1.0) activesupport (>= 3.0.0) + raabro (1.4.0) racc (1.6.0) rack (1.6.13) rack-cors (1.0.6) @@ -272,10 +259,9 @@ GEM sidekiq-congestion (0.1.1) congestion (~> 0.1) sidekiq (>= 3.0) - sidetiq (0.7.2) - celluloid (>= 0.17.3) - ice_cube (~> 0.14.0) - sidekiq (>= 4.1.0) + sidekiq-cron (1.4.0) + fugit (~> 1) + sidekiq (>= 4.2.1) simplecov (0.11.2) docile (~> 1.1.0) json (~> 1.8) @@ -294,8 +280,6 @@ GEM thor (1.1.0) thread_safe (0.3.6) timecop (0.8.1) - timers (4.1.2) - hitimes tzinfo (1.2.10) thread_safe (~> 0.1) webmock (3.4.2) @@ -335,7 +319,7 @@ DEPENDENCIES schema_plus_pg_indexes (~> 0.1.12) sidekiq (< 6) sidekiq-congestion (~> 0.1.0) - sidetiq (~> 0.7.2) + sidekiq-cron simplecov (~> 0.11.2) spring (~> 1.7.1) spring-commands-rspec (~> 1.0.4) diff --git a/app/workers/concerns/digest_email_worker.rb b/app/workers/concerns/digest_email_worker.rb index 8e061c29..e2400542 100644 --- a/app/workers/concerns/digest_email_worker.rb +++ b/app/workers/concerns/digest_email_worker.rb @@ -3,13 +3,8 @@ module DigestEmailWorker included do include Sidekiq::Worker - include Sidetiq::Schedulable sidekiq_options retry: false, backtrace: true - - class << self - attr_accessor :frequency - end end def perform diff --git a/app/workers/concerns/expiry_worker.rb b/app/workers/concerns/expiry_worker.rb index 53db1788..f429ed9e 100644 --- a/app/workers/concerns/expiry_worker.rb +++ b/app/workers/concerns/expiry_worker.rb @@ -3,14 +3,12 @@ module ExpiryWorker included do include Sidekiq::Worker - include Sidetiq::Schedulable class << self attr_accessor :model end sidekiq_options retry: false, backtrace: true - recurrence{ hourly } end def perform diff --git a/app/workers/daily_digest_email_worker.rb b/app/workers/daily_digest_email_worker.rb index d9d590c0..ba16b40c 100644 --- a/app/workers/daily_digest_email_worker.rb +++ b/app/workers/daily_digest_email_worker.rb @@ -1,8 +1,3 @@ class DailyDigestEmailWorker include DigestEmailWorker - self.frequency = :daily - - recurrence do - daily.hour_of_day 6 - end end diff --git a/app/workers/weekly_digest_email_worker.rb b/app/workers/weekly_digest_email_worker.rb index 678ddae8..05ec08a4 100644 --- a/app/workers/weekly_digest_email_worker.rb +++ b/app/workers/weekly_digest_email_worker.rb @@ -1,8 +1,3 @@ class WeeklyDigestEmailWorker include DigestEmailWorker - self.frequency = :weekly - - recurrence do - weekly.day(:monday).hour_of_day 12 - end end diff --git a/config/initializers/sidekiq.rb b/config/initializers/sidekiq.rb index 3be80ac8..909fb07f 100644 --- a/config/initializers/sidekiq.rb +++ b/config/initializers/sidekiq.rb @@ -13,6 +13,12 @@ def self.redis_url config.server_middleware do |chain| chain.add Sidekiq::Congestion::Limiter end + + # Sidekiq-cron: loads recurring jobs from config/schedule.yml + schedule_file = 'config/schedule.yml' + if File.exist?(schedule_file) + Sidekiq::Cron::Job.load_from_hash YAML.load_file(schedule_file) + end end require 'sidekiq/web' @@ -28,8 +34,6 @@ def self.redis_url config.utc = true end -require 'sidetiq/web' - # preload autoloaded workers Dir[Rails.root.join('app/workers/**/*.rb')].sort.each do |path| name = path.match(/workers\/(.+)\.rb$/)[1] diff --git a/config/routes.rb b/config/routes.rb index a230d16d..b00431ed 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,4 +1,5 @@ require 'sidekiq/web' +require 'sidekiq/cron/web' Rails.application.routes.draw do defaults format: 'json' do diff --git a/config/schedule.yml b/config/schedule.yml new file mode 100644 index 00000000..ba67177a --- /dev/null +++ b/config/schedule.yml @@ -0,0 +1,36 @@ +# Here is a list of jobs that are scheduled to run periodically. +# We use a UNIX cron notation to specify execution schedule. +# +# Please read here for more information: +# https://github.com/ondrejbartas/sidekiq-cron#adding-cron-job + +announcement_expiry_worker: + cron: "0 * * * *" + class: "AnnouncementExpiryWorker" + queue: "default" + description: "Hourly worker that destroys all expired Announcements. Announcements expires_at set to 1 month from creation" +daily_digest_email_worker: + cron: "0 6 * * *" + class: "DailyDigestEmailWorker" + queue: "default" + description: "Daily worker that sends notifications to users who have a Daily Subscription Preference. Runs at 6th hour of the day." +data_request_expiry_worker: + cron: "0 * * * *" + class: "DataRequestExpiryWorker" + queue: "default" + description: "Hourly worker that destroys all expired Data Requests. Data Request expires_at is set to 1 day from request creation." +notification_expiry_worker: + cron: "0 * * * *" + class: "NotificationExpiryWorker" + queue: "default" + description: "Hourly worker that destroys all expired Notifications. Notifications expires in 3 months of creation" +unsubscribe_token_expiry_worker: + cron: "0 * * * *" + class: "UnsubscribeTokenExpiryWorker" + queue: "default" + description: "Hourly worker that destroys all unsubscribe_tokens. Unsubscribe_token expires_at set to 1 month of creation" +weekly_digest_expiry_worker: + cron: "0 12 * * 1" + class: "WeeklyDigestEmailWorker" + queue: "default" + description: "Weekly worker that sends notifications to users who have a subscription preference set to weekly. Runs on Mondays on the 12th hour of the day." \ No newline at end of file From 85e66b7d4de54a8c6f97f4c0660af11843715596 Mon Sep 17 00:00:00 2001 From: yuenmichelle1 Date: Wed, 22 May 2024 13:59:33 -0500 Subject: [PATCH 2/9] remove require sidetiq --- config/initializers/sidekiq.rb | 5 ----- 1 file changed, 5 deletions(-) diff --git a/config/initializers/sidekiq.rb b/config/initializers/sidekiq.rb index 909fb07f..49f481f5 100644 --- a/config/initializers/sidekiq.rb +++ b/config/initializers/sidekiq.rb @@ -29,11 +29,6 @@ def self.redis_url password == ENV.fetch('SIDEKIQ_ADMIN_PASSWORD') end unless Rails.env.test? || Rails.env.development? -require 'sidetiq' -Sidetiq.configure do |config| - config.utc = true -end - # preload autoloaded workers Dir[Rails.root.join('app/workers/**/*.rb')].sort.each do |path| name = path.match(/workers\/(.+)\.rb$/)[1] From ec368ac4dbba31a0bd2195cbde7f777937aff920 Mon Sep 17 00:00:00 2001 From: yuenmichelle1 Date: Wed, 22 May 2024 16:19:42 -0500 Subject: [PATCH 3/9] fix cron worker tests for scheduled. add schedulable shared examples. put back frequency attr_accessor for digest email worker --- app/workers/concerns/digest_email_worker.rb | 4 ++++ app/workers/daily_digest_email_worker.rb | 1 + app/workers/weekly_digest_email_worker.rb | 1 + spec/support/shared_examples_for_expirable.rb | 14 +++++++++++--- spec/support/shared_examples_for_schedulable.rb | 16 ++++++++++++++++ spec/workers/daily_digest_email_worker_spec.rb | 11 ++++++++++- spec/workers/weekly_digest_email_worker_spec.rb | 11 ++++++++++- 7 files changed, 53 insertions(+), 5 deletions(-) create mode 100644 spec/support/shared_examples_for_schedulable.rb diff --git a/app/workers/concerns/digest_email_worker.rb b/app/workers/concerns/digest_email_worker.rb index e2400542..8f7975e5 100644 --- a/app/workers/concerns/digest_email_worker.rb +++ b/app/workers/concerns/digest_email_worker.rb @@ -5,6 +5,10 @@ module DigestEmailWorker include Sidekiq::Worker sidekiq_options retry: false, backtrace: true + + class << self + attr_accessor :frequency + end end def perform diff --git a/app/workers/daily_digest_email_worker.rb b/app/workers/daily_digest_email_worker.rb index ba16b40c..d412b9d7 100644 --- a/app/workers/daily_digest_email_worker.rb +++ b/app/workers/daily_digest_email_worker.rb @@ -1,3 +1,4 @@ class DailyDigestEmailWorker include DigestEmailWorker + self.frequency = :daily end diff --git a/app/workers/weekly_digest_email_worker.rb b/app/workers/weekly_digest_email_worker.rb index 05ec08a4..64e0b6c2 100644 --- a/app/workers/weekly_digest_email_worker.rb +++ b/app/workers/weekly_digest_email_worker.rb @@ -1,3 +1,4 @@ class WeeklyDigestEmailWorker include DigestEmailWorker + self.frequency = :weekly end diff --git a/spec/support/shared_examples_for_expirable.rb b/spec/support/shared_examples_for_expirable.rb index 31e2031e..9264f99b 100644 --- a/spec/support/shared_examples_for_expirable.rb +++ b/spec/support/shared_examples_for_expirable.rb @@ -18,9 +18,17 @@ RSpec.shared_examples_for 'an expiry worker' do |model:| it{ is_expected.to be_a Sidekiq::Worker } - describe 'schedule' do - subject{ described_class.schedule.to_s } - it{ is_expected.to eql 'Hourly' } + describe 'hourly schedule' do + it_behaves_like 'is schedulable' do + let(:cron_sched) { '0 * * * *' } + let(:enqueue_time) { Fugit::Cron.parse(cron_sched).previous_time } + let(:class_name) { described_class.name } + let(:enqueued_times) { + [ + enqueue_time.utc + ] + } + end end describe '.model' do diff --git a/spec/support/shared_examples_for_schedulable.rb b/spec/support/shared_examples_for_schedulable.rb new file mode 100644 index 00000000..17c5dfd4 --- /dev/null +++ b/spec/support/shared_examples_for_schedulable.rb @@ -0,0 +1,16 @@ +shared_examples 'is schedulable' do + let(:job) { Sidekiq::Cron::Job.new(name: 'cron_job_name', cron: cron_sched, class: class_name) } + + it 'gets queued on enqueued_times' do + enqueued_times.each do |enqueued_time| + job_enqueue_time = Time.at(job.formated_enqueue_time.to_f).utc + expect(job_enqueue_time).to eq(enqueued_time) + end + end + + it 'does not get enqueued outside of enqueued_times' do + outside_time = enqueued_times.first + 3 * 60 + + expect(job.should_enque?(outside_time)).to be false + end +end \ No newline at end of file diff --git a/spec/workers/daily_digest_email_worker_spec.rb b/spec/workers/daily_digest_email_worker_spec.rb index c19b2e60..86a477a0 100644 --- a/spec/workers/daily_digest_email_worker_spec.rb +++ b/spec/workers/daily_digest_email_worker_spec.rb @@ -2,5 +2,14 @@ RSpec.describe DailyDigestEmailWorker, type: :worker do it_behaves_like 'a digest email worker', scope: :daily - its('class.schedule.to_s'){ is_expected.to eql 'Daily on the 6th hour of the day' } + it_behaves_like 'is schedulable' do + let(:cron_sched) { '0 6 * * *' } + let(:enqueue_time) { Fugit::Cron.parse(cron_sched).previous_time } + let(:class_name) { described_class.name } + let(:enqueued_times) { + [ + enqueue_time.utc + ] + } + end end diff --git a/spec/workers/weekly_digest_email_worker_spec.rb b/spec/workers/weekly_digest_email_worker_spec.rb index 98c66ad3..a5670b2e 100644 --- a/spec/workers/weekly_digest_email_worker_spec.rb +++ b/spec/workers/weekly_digest_email_worker_spec.rb @@ -2,5 +2,14 @@ RSpec.describe WeeklyDigestEmailWorker, type: :worker do it_behaves_like 'a digest email worker', scope: :weekly - its('class.schedule.to_s'){ is_expected.to eql 'Weekly on Mondays on the 12th hour of the day' } + it_behaves_like 'is schedulable' do + let(:cron_sched) { '0 12 * * 1' } + let(:enqueue_time) { Fugit::Cron.parse(cron_sched).previous_time } + let(:class_name) { described_class.name } + let(:enqueued_times) { + [ + enqueue_time.utc + ] + } + end end From 94e978fa491d7528e48da33b4ee274cb3eec862a Mon Sep 17 00:00:00 2001 From: yuenmichelle1 Date: Wed, 22 May 2024 16:30:25 -0500 Subject: [PATCH 4/9] add note on formated enqueue time method --- spec/support/shared_examples_for_schedulable.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/spec/support/shared_examples_for_schedulable.rb b/spec/support/shared_examples_for_schedulable.rb index 17c5dfd4..f4f151e9 100644 --- a/spec/support/shared_examples_for_schedulable.rb +++ b/spec/support/shared_examples_for_schedulable.rb @@ -3,6 +3,7 @@ it 'gets queued on enqueued_times' do enqueued_times.each do |enqueued_time| + # update to formatted_enqueue_time when updating sidekiq-cron to 1.9+ (sidekiq 7 support) job_enqueue_time = Time.at(job.formated_enqueue_time.to_f).utc expect(job_enqueue_time).to eq(enqueued_time) end From ef0ad0bdcdce831c1b80cf35af31db4769c84742 Mon Sep 17 00:00:00 2001 From: yuenmichelle1 Date: Wed, 22 May 2024 16:48:32 -0500 Subject: [PATCH 5/9] attempt adding mock_redisto ensure redis connection errors in CI do not happen --- Gemfile | 1 + Gemfile.lock | 4 ++++ spec/spec_helper.rb | 12 ++++++++++++ 3 files changed, 17 insertions(+) diff --git a/Gemfile b/Gemfile index 7e73a41d..c791f11d 100644 --- a/Gemfile +++ b/Gemfile @@ -36,6 +36,7 @@ end group :test do gem 'codeclimate-test-reporter', '~> 0.5' + gem 'mock_redis' gem 'simplecov', '~> 0.11.2' gem 'webmock', '~> 3.4' end diff --git a/Gemfile.lock b/Gemfile.lock index 1ccbd1da..b16af235 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -148,6 +148,8 @@ GEM mini_mime (1.1.2) mini_portile2 (2.6.1) minitest (5.14.4) + mock_redis (0.36.0) + ruby2_keywords modware (0.1.3) key_struct (~> 0.4) multipart-post (2.1.1) @@ -232,6 +234,7 @@ GEM rspec-mocks (~> 3.4.0) rspec-support (~> 3.4.0) rspec-support (3.4.1) + ruby2_keywords (0.0.5) ruby_dep (1.3.1) safe_yaml (1.0.4) schema_monkey (2.1.5) @@ -305,6 +308,7 @@ DEPENDENCIES json-schema (~> 2.8) json-schema_builder (~> 0.0.8) logstasher (~> 0.9.0) + mock_redis newrelic_rpm pg (~> 0.21) pry (~> 0.11.3) diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index c28999af..ef836a43 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -31,10 +31,22 @@ RSpec.configure do |config| config.include FactoryGirl::Syntax::Methods config.include JSON::SchemaBuilder::RSpecHelper, type: :schema + MOCK_REDIS ||= MockRedis.new config.before(:suite){ WebMock.disable_net_connect! } config.after(:suite){ WebMock.allow_net_connect! } + config.before(:each) do |example| + allow(Redis).to receive(:new).and_return(MOCK_REDIS) + + MOCK_REDIS.keys.each do |key| + MOCK_REDIS.del(key) + end + + # Clears out the jobs for tests using the fake testing + Sidekiq::Worker.clear_all + end + config.expect_with :rspec do |expectations| expectations.include_chain_clauses_in_custom_matcher_descriptions = true end From 4ee3b0f3272f1cc0e88c35a076a81d0bbbcee4ba Mon Sep 17 00:00:00 2001 From: yuenmichelle1 Date: Thu, 23 May 2024 00:25:20 -0500 Subject: [PATCH 6/9] remove extra declaration of spring not caught on merge resolution --- Gemfile | 1 - 1 file changed, 1 deletion(-) diff --git a/Gemfile b/Gemfile index 10f5276f..73e6a7d7 100644 --- a/Gemfile +++ b/Gemfile @@ -30,7 +30,6 @@ gem 'restpack_serializer', git: 'https://github.com/zooniverse/restpack_serializ gem 'sidekiq', '< 6' gem 'sidekiq-congestion', '~> 0.1.0' gem 'sidekiq-cron' -gem 'spring', '~> 1.7.1', group: :development gem 'zoo_stream', '~> 1.0' group :test, :development do From 7012c0d93d421f41fa0cddc62c59a2f8f9cfde88 Mon Sep 17 00:00:00 2001 From: yuenmichelle1 Date: Thu, 23 May 2024 00:28:28 -0500 Subject: [PATCH 7/9] update gemfile next lock with sidekiq-cron --- Gemfile.next.lock | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/Gemfile.next.lock b/Gemfile.next.lock index 4f3b8415..345d464b 100644 --- a/Gemfile.next.lock +++ b/Gemfile.next.lock @@ -62,8 +62,6 @@ GEM benchmark-ips (2.13.0) bigdecimal (3.1.8) builder (3.2.4) - celluloid (0.18.0) - timers (~> 4) codeclimate-test-reporter (0.6.0) simplecov (>= 0.7.1, < 1.0.0) coderay (1.1.3) @@ -83,6 +81,8 @@ GEM domain_name (0.5.20190701) unf (>= 0.0.5, < 1.0.0) erubis (2.7.0) + et-orbi (1.2.11) + tzinfo factory_girl (4.7.0) activesupport (>= 3.0.0) factory_girl_rails (4.7.0) @@ -115,6 +115,9 @@ GEM faraday (~> 1.0) ffi (1.16.3) formatador (1.1.0) + fugit (1.11.0) + et-orbi (~> 1, >= 1.2.11) + raabro (~> 1.4) globalid (1.1.0) activesupport (>= 5.0) guard (2.14.2) @@ -138,7 +141,6 @@ GEM domain_name (~> 0.5) i18n (1.14.5) concurrent-ruby (~> 1.0) - ice_cube (0.14.0) its-it (1.3.0) jmespath (1.6.2) json (1.8.6) @@ -185,6 +187,8 @@ GEM mini_mime (1.1.5) mini_portile2 (2.8.6) minitest (5.23.0) + mock_redis (0.36.0) + ruby2_keywords modware (0.1.3) key_struct (~> 0.4) multipart-post (2.4.1) @@ -216,6 +220,7 @@ GEM nio4r (~> 2.0) pundit (1.1.0) activesupport (>= 3.0.0) + raabro (1.4.0) racc (1.8.0) rack (2.2.9) rack-cors (1.0.6) @@ -313,10 +318,9 @@ GEM sidekiq-congestion (0.1.1) congestion (~> 0.1) sidekiq (>= 3.0) - sidetiq (0.7.2) - celluloid (>= 0.17.3) - ice_cube (~> 0.14.0) - sidekiq (>= 4.1.0) + sidekiq-cron (1.9.1) + fugit (~> 1.8) + sidekiq (>= 4.2.1) simplecov (0.11.2) docile (~> 1.1.0) json (~> 1.8) @@ -343,7 +347,6 @@ GEM thread_safe (0.3.6) timecop (0.9.8) timeout (0.4.1) - timers (4.3.5) tzinfo (1.2.11) thread_safe (~> 0.1) unf (0.1.4) @@ -375,6 +378,7 @@ DEPENDENCIES json-schema (~> 2.8) json-schema_builder (~> 0.0.8) logstasher (~> 0.9.0) + mock_redis newrelic_rpm pg (~> 0.21) pry (~> 0.11.3) @@ -389,7 +393,7 @@ DEPENDENCIES schema_plus_pg_indexes (~> 0.2.1) sidekiq (< 6) sidekiq-congestion (~> 0.1.0) - sidetiq (~> 0.7.2) + sidekiq-cron simplecov (~> 0.11.2) spring (~> 2.0.2) spring-commands-rspec (~> 1.0.4) From 14f8553be7703a4e7757ff1221e0a59684132a15 Mon Sep 17 00:00:00 2001 From: yuenmichelle1 Date: Thu, 23 May 2024 01:03:18 -0500 Subject: [PATCH 8/9] add version constraints on sidekiq-cron --- Gemfile | 2 +- Gemfile.next.lock | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Gemfile b/Gemfile index 73e6a7d7..5adabda4 100644 --- a/Gemfile +++ b/Gemfile @@ -29,7 +29,7 @@ gem 'redis', '~> 3.3.0' gem 'restpack_serializer', git: 'https://github.com/zooniverse/restpack_serializer.git', branch: 'talk-api-version', ref: '637aaaf85e' gem 'sidekiq', '< 6' gem 'sidekiq-congestion', '~> 0.1.0' -gem 'sidekiq-cron' +gem 'sidekiq-cron', '<=1.8.0' # can remove this version constraint once we are on Rails 5+ gem 'zoo_stream', '~> 1.0' group :test, :development do diff --git a/Gemfile.next.lock b/Gemfile.next.lock index 345d464b..7d9c5bb6 100644 --- a/Gemfile.next.lock +++ b/Gemfile.next.lock @@ -318,8 +318,8 @@ GEM sidekiq-congestion (0.1.1) congestion (~> 0.1) sidekiq (>= 3.0) - sidekiq-cron (1.9.1) - fugit (~> 1.8) + sidekiq-cron (1.8.0) + fugit (~> 1) sidekiq (>= 4.2.1) simplecov (0.11.2) docile (~> 1.1.0) @@ -393,7 +393,7 @@ DEPENDENCIES schema_plus_pg_indexes (~> 0.2.1) sidekiq (< 6) sidekiq-congestion (~> 0.1.0) - sidekiq-cron + sidekiq-cron (<= 1.8.0) simplecov (~> 0.11.2) spring (~> 2.0.2) spring-commands-rspec (~> 1.0.4) From 63cc3856748ef084ae9238a3a4ccc5cb7eb83bca Mon Sep 17 00:00:00 2001 From: yuenmichelle1 Date: Thu, 23 May 2024 01:05:59 -0500 Subject: [PATCH 9/9] Update Gemfile.lock --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 4f8d3a69..71b85b60 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -346,7 +346,7 @@ DEPENDENCIES schema_plus_pg_indexes (~> 0.1.12) sidekiq (< 6) sidekiq-congestion (~> 0.1.0) - sidekiq-cron + sidekiq-cron (<= 1.8.0) simplecov (~> 0.11.2) spring (~> 1.7.1) spring-commands-rspec (~> 1.0.4)