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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
51ef4a2f
Commit
51ef4a2f
authored
Dec 12, 2015
by
Gabriel Mazetto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Sidekiq-cron configuration moved to gitlab.yml
parent
a5e44957
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
15 deletions
+20
-15
config/gitlab.yml.example
config/gitlab.yml.example
+9
-0
config/initializers/1_settings.rb
config/initializers/1_settings.rb
+9
-0
config/initializers/sidekiq.rb
config/initializers/sidekiq.rb
+2
-5
config/schedule.yml
config/schedule.yml
+0
-10
No files found.
config/gitlab.yml.example
View file @
51ef4a2f
...
...
@@ -144,6 +144,15 @@ production: &base
# plain_url: "http://..." # default: http://www.gravatar.com/avatar/%{hash}?s=%{size}&d=identicon
# ssl_url: "https://..." # default: https://secure.gravatar.com/avatar/%{hash}?s=%{size}&d=identicon
## Auxiliary jobs
# Periodically executed jobs, to self-heal Gitlab, do external synchronizations, etc.
# Please read here for more information: https://github.com/ondrejbartas/sidekiq-cron#adding-cron-job
cron_jobs:
# Flag stuck CI builds as failed
stuck_ci_builds_worker:
cron: "0 0 * * *"
#
# 2. GitLab CI settings
# ==========================
...
...
config/initializers/1_settings.rb
View file @
51ef4a2f
...
...
@@ -224,6 +224,15 @@ Settings.gravatar['plain_url'] ||= 'http://www.gravatar.com/avatar/%{hash}?s=%{
Settings
.
gravatar
[
'ssl_url'
]
||=
'https://secure.gravatar.com/avatar/%{hash}?s=%{size}&d=identicon'
Settings
.
gravatar
[
'host'
]
=
Settings
.
get_host_without_www
(
Settings
.
gravatar
[
'plain_url'
])
#
# Cron Jobs
#
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'
#
# GitLab Shell
#
...
...
config/initializers/sidekiq.rb
View file @
51ef4a2f
...
...
@@ -18,11 +18,8 @@ Sidekiq.configure_server do |config|
chain
.
add
Gitlab
::
SidekiqMiddleware
::
MemoryKiller
if
ENV
[
'SIDEKIQ_MEMORY_KILLER_MAX_RSS'
]
end
# Sidekiq-cron: load recurring jobs from schedule.yml
schedule_file
=
'config/schedule.yml'
if
File
.
exists?
(
schedule_file
)
Sidekiq
::
Cron
::
Job
.
load_from_hash
YAML
.
load_file
(
schedule_file
)
end
# Sidekiq-cron: load recurring jobs from gitlab.yml
Sidekiq
::
Cron
::
Job
.
load_from_hash!
Gitlab
.
config
.
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
...
...
config/schedule.yml
deleted
100644 → 0
View file @
a5e44957
# Here is a list of jobs that are scheduled to run periodically.
# We use a UNIX cron notation to specify execution schedule.
#
# Please read here for more information:
# https://github.com/ondrejbartas/sidekiq-cron#adding-cron-job
stuck_ci_builds_worker
:
cron
:
"
0
0
*
*
*"
class
:
"
StuckCiBuildsWorker"
queue
:
"
default"
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