Commit a8fb310c authored by Rémy Coutable's avatar Rémy Coutable

Merge branch '31554-update-rufus-scheduler-and-sidekiq' into 'master'

Resolve "Update gem sidekiq-cron from 0.4.4 to 0.6.0 and rufus-scheduler from 3.1.10 to 3.4.0"

Closes #31554

See merge request !10976
parents 8d58e103 11759374
...@@ -145,12 +145,12 @@ gem 'acts-as-taggable-on', '~> 4.0' ...@@ -145,12 +145,12 @@ gem 'acts-as-taggable-on', '~> 4.0'
# Background jobs # Background jobs
gem 'sidekiq', '~> 5.0' gem 'sidekiq', '~> 5.0'
gem 'sidekiq-cron', '~> 0.4.4' gem 'sidekiq-cron', '~> 0.6.0'
gem 'redis-namespace', '~> 1.5.2' gem 'redis-namespace', '~> 1.5.2'
gem 'sidekiq-limit_fetch', '~> 3.4' gem 'sidekiq-limit_fetch', '~> 3.4'
# Cron Parser # Cron Parser
gem 'rufus-scheduler', '~> 3.1.10' gem 'rufus-scheduler', '~> 3.4'
# HTTP requests # HTTP requests
gem 'httparty', '~> 0.13.3' gem 'httparty', '~> 0.13.3'
......
...@@ -181,6 +181,8 @@ GEM ...@@ -181,6 +181,8 @@ GEM
equalizer (0.0.11) equalizer (0.0.11)
erubis (2.7.0) erubis (2.7.0)
escape_utils (1.1.1) escape_utils (1.1.1)
et-orbi (1.0.3)
tzinfo
eventmachine (1.0.8) eventmachine (1.0.8)
excon (0.55.0) excon (0.55.0)
execjs (2.6.0) execjs (2.6.0)
...@@ -697,7 +699,8 @@ GEM ...@@ -697,7 +699,8 @@ GEM
rubyntlm (0.5.2) rubyntlm (0.5.2)
rubypants (0.2.0) rubypants (0.2.0)
rubyzip (1.2.1) rubyzip (1.2.1)
rufus-scheduler (3.1.10) rufus-scheduler (3.4.0)
et-orbi (~> 1.0)
rugged (0.25.1.1) rugged (0.25.1.1)
safe_yaml (1.0.4) safe_yaml (1.0.4)
sanitize (2.1.0) sanitize (2.1.0)
...@@ -734,9 +737,8 @@ GEM ...@@ -734,9 +737,8 @@ GEM
connection_pool (~> 2.2, >= 2.2.0) connection_pool (~> 2.2, >= 2.2.0)
rack-protection (>= 1.5.0) rack-protection (>= 1.5.0)
redis (~> 3.3, >= 3.3.3) redis (~> 3.3, >= 3.3.3)
sidekiq-cron (0.4.4) sidekiq-cron (0.6.0)
redis-namespace (>= 1.5.2) rufus-scheduler (>= 3.3.0)
rufus-scheduler (>= 2.0.24)
sidekiq (>= 4.2.1) sidekiq (>= 4.2.1)
sidekiq-limit_fetch (3.4.0) sidekiq-limit_fetch (3.4.0)
sidekiq (>= 4) sidekiq (>= 4)
...@@ -1013,7 +1015,7 @@ DEPENDENCIES ...@@ -1013,7 +1015,7 @@ DEPENDENCIES
ruby-fogbugz (~> 0.2.1) ruby-fogbugz (~> 0.2.1)
ruby-prof (~> 0.16.2) ruby-prof (~> 0.16.2)
ruby_parser (~> 3.8.4) ruby_parser (~> 3.8.4)
rufus-scheduler (~> 3.1.10) rufus-scheduler (~> 3.4)
rugged (~> 0.25.1.1) rugged (~> 0.25.1.1)
sanitize (~> 2.0) sanitize (~> 2.0)
sass-rails (~> 5.0.6) sass-rails (~> 5.0.6)
...@@ -1025,7 +1027,7 @@ DEPENDENCIES ...@@ -1025,7 +1027,7 @@ DEPENDENCIES
sham_rack (~> 1.3.6) sham_rack (~> 1.3.6)
shoulda-matchers (~> 2.8.0) shoulda-matchers (~> 2.8.0)
sidekiq (~> 5.0) sidekiq (~> 5.0)
sidekiq-cron (~> 0.4.4) sidekiq-cron (~> 0.6.0)
sidekiq-limit_fetch (~> 3.4) sidekiq-limit_fetch (~> 3.4)
simplecov (~> 0.14.0) simplecov (~> 0.14.0)
slack-notifier (~> 1.5.1) slack-notifier (~> 1.5.1)
......
---
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 ...@@ -11,7 +11,7 @@ module Gitlab
def next_time_from(time) def next_time_from(time)
@cron_line ||= try_parse_cron(@cron, @cron_timezone) @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 end
def cron_valid? def cron_valid?
......
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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment