diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-20 02:18:09 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-20 02:18:09 +0300 |
commit | 6ed4ec3e0b1340f96b7c043ef51d1b33bbe85fde (patch) | |
tree | dc4d20fe6064752c0bd323187252c77e0a89144b /lib/gitlab/patch/sidekiq_cron_poller.rb | |
parent | 9868dae7fc0655bd7ce4a6887d4e6d487690eeed (diff) |
Add latest changes from gitlab-org/gitlab@15-4-stable-eev15.4.0-rc42
Diffstat (limited to 'lib/gitlab/patch/sidekiq_cron_poller.rb')
-rw-r--r-- | lib/gitlab/patch/sidekiq_cron_poller.rb | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/gitlab/patch/sidekiq_cron_poller.rb b/lib/gitlab/patch/sidekiq_cron_poller.rb new file mode 100644 index 00000000000..630c364d455 --- /dev/null +++ b/lib/gitlab/patch/sidekiq_cron_poller.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# Patch to address https://github.com/ondrejbartas/sidekiq-cron/issues/361 +# This restores the poll interval to v1.2.0 behavior +# https://github.com/ondrejbartas/sidekiq-cron/blob/v1.2.0/lib/sidekiq/cron/poller.rb#L36-L38 +# This patch only applies to v1.4.0 +require 'sidekiq/cron/version' + +if Gem::Version.new(Sidekiq::Cron::VERSION) != Gem::Version.new('1.4.0') + raise 'New version of sidekiq-cron detected, please remove or update this patch' +end + +module Gitlab + module Patch + module SidekiqCronPoller + def poll_interval_average + Sidekiq.options[:poll_interval] || Sidekiq::Cron::POLL_INTERVAL + end + end + end +end |