mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-02-21 15:54:22 +01:00
Removed unmaintained gem sidekiq-cron and replaced it with sidekiq-scheduler
This commit is contained in:
parent
d921231392
commit
3955a282b8
@ -5,11 +5,12 @@
|
|||||||
- Updated i18next to 21.6.13
|
- Updated i18next to 21.6.13
|
||||||
- Updated i18next-icu to 2.0.3
|
- Updated i18next-icu to 2.0.3
|
||||||
- Updated sidekiq-unique-jobs to 7.1.15
|
- Updated sidekiq-unique-jobs to 7.1.15
|
||||||
|
- Removed unmaintained gem sidekiq-cron and replaced it with sidekiq-scheduler
|
||||||
- Fix a bug: a sentence was not linked to a translation key
|
- 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 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)
|
- 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)
|
||||||
- Fix a security issue: updated rails to 5.2.6.3 to fix [CVE-2022-21831](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-21831), [CVE-2022-23633](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-23633)
|
- Fix a security issue: updated rails to 5.2.6.3 to fix [CVE-2022-21831](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-21831), [CVE-2022-23633](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-23633)
|
||||||
- Fix a security issue: updated sidekiq to 6.4.0 to fix [CVE-2022-23837](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-23837)
|
- Fix a security issue: updated sidekiq to 6.4.1 to fix [CVE-2022-23837](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-23837)
|
||||||
- Fix a security issue: updated nokogiri to 1.13.3 to fix [CVE-2021-30560](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-30560) and [CVE-2022-23308](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-23308)
|
- Fix a security issue: updated nokogiri to 1.13.3 to fix [CVE-2021-30560](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-30560) and [CVE-2022-23308](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-23308)
|
||||||
- Fix a security issue: updated puma to 4.3.11 to fix [CVE-2022-23634](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-23634)
|
- Fix a security issue: updated puma to 4.3.11 to fix [CVE-2022-23634](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-23634)
|
||||||
- Fix a security issue: updated i18next-http-backend to 1.3.2 to fix [CVE-2022-0235](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-0235)
|
- Fix a security issue: updated i18next-http-backend to 1.3.2 to fix [CVE-2022-0235](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-0235)
|
||||||
|
2
Gemfile
2
Gemfile
@ -90,7 +90,7 @@ gem 'aasm'
|
|||||||
# Background job processing
|
# Background job processing
|
||||||
gem 'sidekiq', '>= 6.0.7'
|
gem 'sidekiq', '>= 6.0.7'
|
||||||
# Recurring jobs for Sidekiq
|
# Recurring jobs for Sidekiq
|
||||||
gem 'sidekiq-cron'
|
gem 'sidekiq-scheduler'
|
||||||
gem 'sidekiq-unique-jobs', '~> 7.1.15'
|
gem 'sidekiq-unique-jobs', '~> 7.1.15'
|
||||||
|
|
||||||
gem 'stripe', '5.29.0'
|
gem 'stripe', '5.29.0'
|
||||||
|
30
Gemfile.lock
30
Gemfile.lock
@ -118,6 +118,7 @@ GEM
|
|||||||
dotenv-rails (2.7.5)
|
dotenv-rails (2.7.5)
|
||||||
dotenv (= 2.7.5)
|
dotenv (= 2.7.5)
|
||||||
railties (>= 3.2, < 6.1)
|
railties (>= 3.2, < 6.1)
|
||||||
|
e2mmap (0.1.0)
|
||||||
elasticsearch (5.0.5)
|
elasticsearch (5.0.5)
|
||||||
elasticsearch-api (= 5.0.5)
|
elasticsearch-api (= 5.0.5)
|
||||||
elasticsearch-transport (= 5.0.5)
|
elasticsearch-transport (= 5.0.5)
|
||||||
@ -140,7 +141,7 @@ GEM
|
|||||||
multi_json
|
multi_json
|
||||||
equalizer (0.0.11)
|
equalizer (0.0.11)
|
||||||
erubi (1.10.0)
|
erubi (1.10.0)
|
||||||
et-orbi (1.2.1)
|
et-orbi (1.2.7)
|
||||||
tzinfo
|
tzinfo
|
||||||
faker (2.10.2)
|
faker (2.10.2)
|
||||||
i18n (>= 1.6, < 2)
|
i18n (>= 1.6, < 2)
|
||||||
@ -151,9 +152,9 @@ GEM
|
|||||||
forgery (0.7.0)
|
forgery (0.7.0)
|
||||||
friendly_id (5.1.0)
|
friendly_id (5.1.0)
|
||||||
activerecord (>= 4.0.0)
|
activerecord (>= 4.0.0)
|
||||||
fugit (1.3.1)
|
fugit (1.5.2)
|
||||||
et-orbi (~> 1.1, >= 1.1.8)
|
et-orbi (~> 1.1, >= 1.1.8)
|
||||||
raabro (~> 1.1)
|
raabro (~> 1.4)
|
||||||
globalid (1.0.0)
|
globalid (1.0.0)
|
||||||
activesupport (>= 5.0)
|
activesupport (>= 5.0)
|
||||||
hashdiff (1.0.1)
|
hashdiff (1.0.1)
|
||||||
@ -276,7 +277,7 @@ GEM
|
|||||||
nio4r (~> 2.0)
|
nio4r (~> 2.0)
|
||||||
pundit (2.1.0)
|
pundit (2.1.0)
|
||||||
activesupport (>= 3.0.0)
|
activesupport (>= 3.0.0)
|
||||||
raabro (1.1.6)
|
raabro (1.4.0)
|
||||||
racc (1.6.0)
|
racc (1.6.0)
|
||||||
rack (2.2.3)
|
rack (2.2.3)
|
||||||
rack-proxy (0.6.5)
|
rack-proxy (0.6.5)
|
||||||
@ -324,7 +325,7 @@ GEM
|
|||||||
recurrence (1.3.0)
|
recurrence (1.3.0)
|
||||||
activesupport
|
activesupport
|
||||||
i18n
|
i18n
|
||||||
redis (4.5.1)
|
redis (4.6.0)
|
||||||
repost (0.3.2)
|
repost (0.3.2)
|
||||||
responders (2.4.1)
|
responders (2.4.1)
|
||||||
actionpack (>= 4.2.0, < 6.0)
|
actionpack (>= 4.2.0, < 6.0)
|
||||||
@ -346,6 +347,8 @@ GEM
|
|||||||
nokogiri (>= 1.10.8)
|
nokogiri (>= 1.10.8)
|
||||||
rubyzip (>= 1.3.0)
|
rubyzip (>= 1.3.0)
|
||||||
rubyzip (2.3.0)
|
rubyzip (2.3.0)
|
||||||
|
rufus-scheduler (3.8.1)
|
||||||
|
fugit (~> 1.1, >= 1.1.6)
|
||||||
safe_yaml (1.0.5)
|
safe_yaml (1.0.5)
|
||||||
sassc (2.4.0)
|
sassc (2.4.0)
|
||||||
ffi (~> 1.9)
|
ffi (~> 1.9)
|
||||||
@ -354,13 +357,17 @@ GEM
|
|||||||
activesupport (>= 4)
|
activesupport (>= 4)
|
||||||
semantic_range (2.3.0)
|
semantic_range (2.3.0)
|
||||||
sha3 (1.0.1)
|
sha3 (1.0.1)
|
||||||
sidekiq (6.4.0)
|
sidekiq (6.4.1)
|
||||||
connection_pool (>= 2.2.2)
|
connection_pool (>= 2.2.2)
|
||||||
rack (~> 2.0)
|
rack (~> 2.0)
|
||||||
redis (>= 4.2.0)
|
redis (>= 4.2.0)
|
||||||
sidekiq-cron (1.1.0)
|
sidekiq-scheduler (3.1.1)
|
||||||
fugit (~> 1.1)
|
e2mmap
|
||||||
sidekiq (>= 4.2.1)
|
redis (>= 3, < 5)
|
||||||
|
rufus-scheduler (~> 3.2)
|
||||||
|
sidekiq (>= 3)
|
||||||
|
thwait
|
||||||
|
tilt (>= 1.4.0)
|
||||||
sidekiq-unique-jobs (7.1.15)
|
sidekiq-unique-jobs (7.1.15)
|
||||||
brpoplpush-redis_script (> 0.1.1, <= 2.0.0)
|
brpoplpush-redis_script (> 0.1.1, <= 2.0.0)
|
||||||
concurrent-ruby (~> 1.0, >= 1.0.5)
|
concurrent-ruby (~> 1.0, >= 1.0.5)
|
||||||
@ -391,6 +398,9 @@ GEM
|
|||||||
tins (~> 1.0)
|
tins (~> 1.0)
|
||||||
thor (0.20.3)
|
thor (0.20.3)
|
||||||
thread_safe (0.3.6)
|
thread_safe (0.3.6)
|
||||||
|
thwait (0.2.0)
|
||||||
|
e2mmap
|
||||||
|
tilt (2.0.10)
|
||||||
tins (1.25.0)
|
tins (1.25.0)
|
||||||
sync
|
sync
|
||||||
ttfunk (1.5.1)
|
ttfunk (1.5.1)
|
||||||
@ -497,7 +507,7 @@ DEPENDENCIES
|
|||||||
seed_dump
|
seed_dump
|
||||||
sha3
|
sha3
|
||||||
sidekiq (>= 6.0.7)
|
sidekiq (>= 6.0.7)
|
||||||
sidekiq-cron
|
sidekiq-scheduler
|
||||||
sidekiq-unique-jobs (~> 7.1.15)
|
sidekiq-unique-jobs (~> 7.1.15)
|
||||||
spring
|
spring
|
||||||
spring-watcher-listen (~> 2.0.0)
|
spring-watcher-listen (~> 2.0.0)
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
require 'sidekiq'
|
||||||
|
require 'sidekiq-scheduler'
|
||||||
|
|
||||||
redis_host = ENV['REDIS_HOST'] || 'localhost'
|
redis_host = ENV['REDIS_HOST'] || 'localhost'
|
||||||
redis_url = "redis://#{redis_host}:6379"
|
redis_url = "redis://#{redis_host}:6379"
|
||||||
|
|
||||||
@ -16,12 +19,14 @@ Sidekiq.configure_server do |config|
|
|||||||
|
|
||||||
SidekiqUniqueJobs::Server.configure(config)
|
SidekiqUniqueJobs::Server.configure(config)
|
||||||
|
|
||||||
# load sidekiq-cron schedule config
|
config.on(:startup) do
|
||||||
schedule_file = 'config/schedule.yml'
|
# load sidekiq-scheduler schedule config
|
||||||
|
schedule_file = 'config/schedule.yml'
|
||||||
if File.exist?(schedule_file)
|
if File.exist?(schedule_file)
|
||||||
rendered_schedule_file = ERB.new(File.read(schedule_file)).result
|
rendered_schedule_file = ERB.new(File.read(schedule_file)).result
|
||||||
Sidekiq::Cron::Job.load_from_hash YAML.safe_load(rendered_schedule_file)
|
Sidekiq.schedule = YAML.safe_load(rendered_schedule_file)
|
||||||
|
SidekiqScheduler::Scheduler.instance.reload_schedule!
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -33,8 +38,6 @@ Sidekiq.configure_client do |config|
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
Sidekiq::Extensions.enable_delay!
|
|
||||||
|
|
||||||
# Quieting logging in the test environment
|
# Quieting logging in the test environment
|
||||||
if Rails.env.test?
|
if Rails.env.test?
|
||||||
require 'sidekiq/testing'
|
require 'sidekiq/testing'
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require 'sidekiq_unique_jobs/web'
|
require 'sidekiq_unique_jobs/web'
|
||||||
require 'sidekiq/cron/web'
|
require 'sidekiq-scheduler/web'
|
||||||
|
|
||||||
Rails.application.routes.draw do
|
Rails.application.routes.draw do
|
||||||
if AuthProvider.active.providable_type == DatabaseProvider.name
|
if AuthProvider.active.providable_type == DatabaseProvider.name
|
||||||
|
@ -1,38 +1,38 @@
|
|||||||
subscription_expire_in_7_days:
|
subscription_expire_in_7_days:
|
||||||
cron: "0 0 * * *"
|
cron: "0 0 * * *"
|
||||||
class: "SubscriptionExpireWorker"
|
class: SubscriptionExpireWorker
|
||||||
queue: default
|
queue: default
|
||||||
args: [7]
|
args: [7]
|
||||||
|
|
||||||
subscription_is_expired:
|
subscription_is_expired:
|
||||||
cron: "0 23 * * *"
|
cron: "0 23 * * *"
|
||||||
class: "SubscriptionExpireWorker"
|
class: SubscriptionExpireWorker
|
||||||
queue: default
|
queue: default
|
||||||
args: [0]
|
args: [0]
|
||||||
|
|
||||||
generate_statistic:
|
generate_statistic:
|
||||||
cron: "0 1 * * *"
|
cron: "0 1 * * *"
|
||||||
class: "StatisticWorker"
|
class: StatisticWorker
|
||||||
queue: default
|
queue: default
|
||||||
|
|
||||||
i_calendar_import:
|
i_calendar_import:
|
||||||
cron: "0 * * * *"
|
cron: "0 * * * *"
|
||||||
class: "ICalendarImportWorker"
|
class: ICalendarImportWorker
|
||||||
queue: default
|
queue: default
|
||||||
|
|
||||||
reservation_reminder:
|
reservation_reminder:
|
||||||
cron: "1 * * * *"
|
cron: "1 * * * *"
|
||||||
class: "ReservationReminderWorker"
|
class: ReservationReminderWorker
|
||||||
queue: default
|
queue: default
|
||||||
|
|
||||||
close_period_reminder_worker:
|
close_period_reminder_worker:
|
||||||
cron: "0 12 * * 1" # every monday at 12pm
|
cron: "0 12 * * 1" # every monday at 12pm
|
||||||
class: "ClosePeriodReminderWorker"
|
class: ClosePeriodReminderWorker
|
||||||
queue: default
|
queue: default
|
||||||
|
|
||||||
free_disk_space:
|
free_disk_space:
|
||||||
cron: "0 5 * * 0" # every sunday at 5am
|
cron: "0 5 * * 0" # every sunday at 5am
|
||||||
class: "FreeDiskSpaceWorker"
|
class: FreeDiskSpaceWorker
|
||||||
queue: system
|
queue: system
|
||||||
|
|
||||||
# schedule a version check, every week at the current day+time
|
# schedule a version check, every week at the current day+time
|
||||||
@ -40,12 +40,12 @@ free_disk_space:
|
|||||||
<% m = DateTime.current.minute - 1; h = DateTime.current.hour; d = DateTime.current.cwday %>
|
<% m = DateTime.current.minute - 1; h = DateTime.current.hour; d = DateTime.current.cwday %>
|
||||||
version_check:
|
version_check:
|
||||||
cron: <%="#{m} #{h} * * #{d}" %>
|
cron: <%="#{m} #{h} * * #{d}" %>
|
||||||
class: 'VersionCheckWorker'
|
class: VersionCheckWorker
|
||||||
queue: system
|
queue: system
|
||||||
|
|
||||||
payment_schedule_item:
|
payment_schedule_item:
|
||||||
cron: "0 * * * *" # every day, every hour
|
cron: "0 * * * *" # every day, every hour
|
||||||
class: 'PaymentScheduleItemWorker'
|
class: PaymentScheduleItemWorker
|
||||||
queue: default
|
queue: default
|
||||||
|
|
||||||
<%= PluginRegistry.insert_code('yml.schedule') %>
|
<%= PluginRegistry.insert_code('yml.schedule') %>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user