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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
aaba9ebb
Commit
aaba9ebb
authored
Jul 18, 2016
by
Gabriel Mazetto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve cron_jobs loading error messages
parent
aba558a4
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
CHANGELOG
CHANGELOG
+1
-0
config/initializers/sidekiq.rb
config/initializers/sidekiq.rb
+8
-1
No files found.
CHANGELOG
View file @
aaba9ebb
...
@@ -116,6 +116,7 @@ v 8.10.0 (unreleased)
...
@@ -116,6 +116,7 @@ v 8.10.0 (unreleased)
- Fix last update timestamp on issues not preserved on gitlab.com and project imports
- Fix last update timestamp on issues not preserved on gitlab.com and project imports
- Fix issues importing projects from EE to CE
- Fix issues importing projects from EE to CE
- Fix creating group with space in group path
- Fix creating group with space in group path
- Improve cron_jobs loading error messages !5318
- Create Todos for Issue author when assign or mention himself (Katarzyna Kobierska)
- Create Todos for Issue author when assign or mention himself (Katarzyna Kobierska)
- Limit the number of retries on error to 3 for exporting projects
- Limit the number of retries on error to 3 for exporting projects
- Allow empty repositories on project import/export
- Allow empty repositories on project import/export
...
...
config/initializers/sidekiq.rb
View file @
aaba9ebb
...
@@ -13,7 +13,14 @@ Sidekiq.configure_server do |config|
...
@@ -13,7 +13,14 @@ Sidekiq.configure_server do |config|
# UGLY Hack to get nested hash from settingslogic
# UGLY Hack to get nested hash from settingslogic
cron_jobs
=
JSON
.
parse
(
Gitlab
.
config
.
cron_jobs
.
to_json
)
cron_jobs
=
JSON
.
parse
(
Gitlab
.
config
.
cron_jobs
.
to_json
)
# UGLY hack: Settingslogic doesn't allow 'class' key
# UGLY hack: Settingslogic doesn't allow 'class' key
cron_jobs
.
each
{
|
k
,
v
|
cron_jobs
[
k
][
'class'
]
=
cron_jobs
[
k
].
delete
(
'job_class'
)
}
cron_jobs_required_keys
=
%w(job_class cron)
cron_jobs
.
each
do
|
k
,
v
|
if
cron_jobs
[
k
]
&&
cron_jobs_required_keys
.
all?
{
|
s
|
cron_jobs
[
k
].
key?
(
s
)
}
cron_jobs
[
k
][
'class'
]
=
cron_jobs
[
k
].
delete
(
'job_class'
)
else
raise
(
"Invalid cron_jobs config key: '
#{
k
}
'. Check your gitlab config file."
)
end
end
Sidekiq
::
Cron
::
Job
.
load_from_hash!
cron_jobs
Sidekiq
::
Cron
::
Job
.
load_from_hash!
cron_jobs
# Database pool should be at least `sidekiq_concurrency` + 2
# Database pool should be at least `sidekiq_concurrency` + 2
...
...
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