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
Boxiang Sun
gitlab-ce
Commits
0c3ac036
Commit
0c3ac036
authored
Dec 22, 2015
by
Gabriel Mazetto
Committed by
Robert Speicher
Dec 22, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Hotfix for sidekiq-cron being loaded from Settingslogic with defaults
parent
b0f1453f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
config/initializers/1_settings.rb
config/initializers/1_settings.rb
+1
-1
config/initializers/sidekiq.rb
config/initializers/sidekiq.rb
+5
-1
No files found.
config/initializers/1_settings.rb
View file @
0c3ac036
...
...
@@ -230,7 +230,7 @@ Settings.gravatar['host'] = Settings.get_host_without_www(Settings.grava
Settings
[
'cron_jobs'
]
||=
Settingslogic
.
new
({})
Settings
.
cron_jobs
[
'stuck_ci_builds_worker'
]
||=
Settingslogic
.
new
({})
Settings
.
cron_jobs
[
'stuck_ci_builds_worker'
][
'cron'
]
||=
'0 0 * * *'
Settings
.
cron_jobs
[
'stuck_ci_builds_worker'
][
'class'
]
=
'StuckCiBuildsWorker'
Settings
.
cron_jobs
[
'stuck_ci_builds_worker'
][
'
job_
class'
]
=
'StuckCiBuildsWorker'
#
...
...
config/initializers/sidekiq.rb
View file @
0c3ac036
...
...
@@ -19,7 +19,11 @@ Sidekiq.configure_server do |config|
end
# Sidekiq-cron: load recurring jobs from gitlab.yml
Sidekiq
::
Cron
::
Job
.
load_from_hash!
Gitlab
.
config
.
cron_jobs
# UGLY Hack to get nested hash from settingslogic
cron_jobs
=
JSON
.
parse
(
Gitlab
.
config
.
cron_jobs
.
to_json
)
# UGLY hack: Settingslogic doesn't allow 'class' key
cron_jobs
.
each
{
|
k
,
v
|
cron_jobs
[
k
][
'class'
]
=
cron_jobs
[
k
].
delete
(
'job_class'
)
}
Sidekiq
::
Cron
::
Job
.
load_from_hash!
cron_jobs
# Database pool should be at least `sidekiq_concurrency` + 2
# For more info, see: https://github.com/mperham/sidekiq/blob/master/4.0-Upgrade.md
...
...
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