Resolve "Update gem sidekiq-cron from 0.4.4 to 0.6.0 and rufus-scheduler from 3.1.10 to 3.4.0"
This commit is contained in:
parent
8d58e10385
commit
1175937469
5 changed files with 34 additions and 9 deletions
4
Gemfile
4
Gemfile
|
@ -145,12 +145,12 @@ gem 'acts-as-taggable-on', '~> 4.0'
|
|||
|
||||
# Background jobs
|
||||
gem 'sidekiq', '~> 5.0'
|
||||
gem 'sidekiq-cron', '~> 0.4.4'
|
||||
gem 'sidekiq-cron', '~> 0.6.0'
|
||||
gem 'redis-namespace', '~> 1.5.2'
|
||||
gem 'sidekiq-limit_fetch', '~> 3.4'
|
||||
|
||||
# Cron Parser
|
||||
gem 'rufus-scheduler', '~> 3.1.10'
|
||||
gem 'rufus-scheduler', '~> 3.4'
|
||||
|
||||
# HTTP requests
|
||||
gem 'httparty', '~> 0.13.3'
|
||||
|
|
14
Gemfile.lock
14
Gemfile.lock
|
@ -181,6 +181,8 @@ GEM
|
|||
equalizer (0.0.11)
|
||||
erubis (2.7.0)
|
||||
escape_utils (1.1.1)
|
||||
et-orbi (1.0.3)
|
||||
tzinfo
|
||||
eventmachine (1.0.8)
|
||||
excon (0.55.0)
|
||||
execjs (2.6.0)
|
||||
|
@ -697,7 +699,8 @@ GEM
|
|||
rubyntlm (0.5.2)
|
||||
rubypants (0.2.0)
|
||||
rubyzip (1.2.1)
|
||||
rufus-scheduler (3.1.10)
|
||||
rufus-scheduler (3.4.0)
|
||||
et-orbi (~> 1.0)
|
||||
rugged (0.25.1.1)
|
||||
safe_yaml (1.0.4)
|
||||
sanitize (2.1.0)
|
||||
|
@ -734,9 +737,8 @@ GEM
|
|||
connection_pool (~> 2.2, >= 2.2.0)
|
||||
rack-protection (>= 1.5.0)
|
||||
redis (~> 3.3, >= 3.3.3)
|
||||
sidekiq-cron (0.4.4)
|
||||
redis-namespace (>= 1.5.2)
|
||||
rufus-scheduler (>= 2.0.24)
|
||||
sidekiq-cron (0.6.0)
|
||||
rufus-scheduler (>= 3.3.0)
|
||||
sidekiq (>= 4.2.1)
|
||||
sidekiq-limit_fetch (3.4.0)
|
||||
sidekiq (>= 4)
|
||||
|
@ -1013,7 +1015,7 @@ DEPENDENCIES
|
|||
ruby-fogbugz (~> 0.2.1)
|
||||
ruby-prof (~> 0.16.2)
|
||||
ruby_parser (~> 3.8.4)
|
||||
rufus-scheduler (~> 3.1.10)
|
||||
rufus-scheduler (~> 3.4)
|
||||
rugged (~> 0.25.1.1)
|
||||
sanitize (~> 2.0)
|
||||
sass-rails (~> 5.0.6)
|
||||
|
@ -1025,7 +1027,7 @@ DEPENDENCIES
|
|||
sham_rack (~> 1.3.6)
|
||||
shoulda-matchers (~> 2.8.0)
|
||||
sidekiq (~> 5.0)
|
||||
sidekiq-cron (~> 0.4.4)
|
||||
sidekiq-cron (~> 0.6.0)
|
||||
sidekiq-limit_fetch (~> 3.4)
|
||||
simplecov (~> 0.14.0)
|
||||
slack-notifier (~> 1.5.1)
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Update gem sidekiq-cron from 0.4.4 to 0.6.0 and rufus-scheduler from 3.1.10
|
||||
to 3.4.0
|
||||
merge_request: 10976
|
||||
author: dosuken123
|
|
@ -11,7 +11,7 @@ module Gitlab
|
|||
|
||||
def next_time_from(time)
|
||||
@cron_line ||= try_parse_cron(@cron, @cron_timezone)
|
||||
@cron_line.next_time(time).in_time_zone(Time.zone) if @cron_line.present?
|
||||
@cron_line.next_time(time).utc.in_time_zone(Time.zone) if @cron_line.present?
|
||||
end
|
||||
|
||||
def cron_valid?
|
||||
|
|
18
spec/sidekiq/cron/job_gem_dependency_spec.rb
Normal file
18
spec/sidekiq/cron/job_gem_dependency_spec.rb
Normal file
|
@ -0,0 +1,18 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe Sidekiq::Cron::Job do
|
||||
describe 'cron jobs' do
|
||||
context 'when rufus-scheduler depends on ZoTime or EoTime' do
|
||||
before do
|
||||
described_class
|
||||
.create(name: 'TestCronWorker',
|
||||
cron: Settings.cron_jobs[:pipeline_schedule_worker]['cron'],
|
||||
class: Settings.cron_jobs[:pipeline_schedule_worker]['job_class'])
|
||||
end
|
||||
|
||||
it 'does not get "Rufus::Scheduler::ZoTime/EtOrbi::EoTime into an exact number"' do
|
||||
expect { described_class.all.first.should_enque?(Time.now) }.not_to raise_error
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue