diff options
author | Dosuken shinya <gitlab.shinyamaeda@gmail.com> | 2017-05-10 15:48:09 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-05-10 15:48:09 +0000 |
commit | 11759374698eb172c05e6a701d4ff7dc5f9d8251 (patch) | |
tree | 68707ee7f05bbe323146db9216f75c52e448e61f | |
parent | 8d58e10385f128084a4187effa07cd4d3535dcbc (diff) | |
download | gitlab-ce-11759374698eb172c05e6a701d4ff7dc5f9d8251.tar.gz |
Resolve "Update gem sidekiq-cron from 0.4.4 to 0.6.0 and rufus-scheduler from 3.1.10 to 3.4.0"
-rw-r--r-- | Gemfile | 4 | ||||
-rw-r--r-- | Gemfile.lock | 14 | ||||
-rw-r--r-- | changelogs/unreleased/31554-update-rufus-scheduler-and-sidekiq.yml | 5 | ||||
-rw-r--r-- | lib/gitlab/ci/cron_parser.rb | 2 | ||||
-rw-r--r-- | spec/sidekiq/cron/job_gem_dependency_spec.rb | 18 |
5 files changed, 34 insertions, 9 deletions
@@ -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' diff --git a/Gemfile.lock b/Gemfile.lock index c0c56aa9602..6c52f1d70d9 100644 --- a/Gemfile.lock +++ b/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) diff --git a/changelogs/unreleased/31554-update-rufus-scheduler-and-sidekiq.yml b/changelogs/unreleased/31554-update-rufus-scheduler-and-sidekiq.yml new file mode 100644 index 00000000000..0a36b52d561 --- /dev/null +++ b/changelogs/unreleased/31554-update-rufus-scheduler-and-sidekiq.yml @@ -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 diff --git a/lib/gitlab/ci/cron_parser.rb b/lib/gitlab/ci/cron_parser.rb index dad8c3cdf5b..551483d0aaa 100644 --- a/lib/gitlab/ci/cron_parser.rb +++ b/lib/gitlab/ci/cron_parser.rb @@ -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? diff --git a/spec/sidekiq/cron/job_gem_dependency_spec.rb b/spec/sidekiq/cron/job_gem_dependency_spec.rb new file mode 100644 index 00000000000..2e30cf025b0 --- /dev/null +++ b/spec/sidekiq/cron/job_gem_dependency_spec.rb @@ -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 |