Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
0eac37ef
Commit
0eac37ef
authored
May 07, 2019
by
Fabio Pitino
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove temporary workaround rescuing RuntimeError
parent
961da8ed
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
9 deletions
+1
-9
lib/gitlab/ci/cron_parser.rb
lib/gitlab/ci/cron_parser.rb
+1
-9
No files found.
lib/gitlab/ci/cron_parser.rb
View file @
0eac37ef
...
...
@@ -13,7 +13,7 @@ module Gitlab
def
next_time_from
(
time
)
@cron_line
||=
try_parse_cron
(
@cron
,
@cron_timezone
)
find_next_time
(
tim
e
)
if
@cron_line
.
present?
@cron_line
.
next_time
(
time
).
utc
.
in_time_zone
(
Time
.
zon
e
)
if
@cron_line
.
present?
end
def
cron_valid?
...
...
@@ -49,14 +49,6 @@ module Gitlab
def
try_parse_cron
(
cron
,
cron_timezone
)
Fugit
::
Cron
.
parse
(
"
#{
cron
}
#{
cron_timezone
}
"
)
end
def
find_next_time
(
time
)
@cron_line
.
next_time
(
time
).
utc
.
in_time_zone
(
Time
.
zone
)
rescue
RuntimeError
=>
error
raise
error
unless
error
.
message
=~
/too many loops/
# Fugit::Cron raises a RuntimeError if :next_time does not find the next schedule
# given an invalid pattern - E.g. try_parse_cron('0 12 31 2 *')
end
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment