diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2019-01-08 18:36:38 +0300 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2019-01-15 20:06:15 +0300 |
commit | def2d5565ea101f7d9538457a1c20ef87f638c3b (patch) | |
tree | 32848e0cd4fa4854d67d2b669c02b83a4bc9f1ce /lib/gitlab/ci | |
parent | dbecca8eb7320d86492ea2c0aede183b73119f2e (diff) |
Adopt Fugit to replace Rufus::Scheduler
Diffstat (limited to 'lib/gitlab/ci')
-rw-r--r-- | lib/gitlab/ci/cron_parser.rb | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/gitlab/ci/cron_parser.rb b/lib/gitlab/ci/cron_parser.rb index b1db9084662..94f4a4e36c9 100644 --- a/lib/gitlab/ci/cron_parser.rb +++ b/lib/gitlab/ci/cron_parser.rb @@ -35,7 +35,7 @@ module Gitlab # NOTE: # cron_timezone can only accept timezones listed in TZInfo::Timezone. # Aliases of Timezones from ActiveSupport::TimeZone are NOT accepted, - # because Rufus::Scheduler only supports TZInfo::Timezone. + # because Fugit::Cron only supports TZInfo::Timezone. # # For example, those codes have the same effect. # Time.zone = 'Pacific Time (US & Canada)' (ActiveSupport::TimeZone) @@ -47,10 +47,7 @@ module Gitlab # If you want to know more, please take a look # https://github.com/rails/rails/blob/master/activesupport/lib/active_support/values/time_zone.rb def try_parse_cron(cron, cron_timezone) - cron_line = Rufus::Scheduler.parse("#{cron} #{cron_timezone}") - cron_line if cron_line.is_a?(Rufus::Scheduler::CronLine) - rescue - # noop + Fugit::Cron.parse("#{cron} #{cron_timezone}") end end end |