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
fde54e2c
Commit
fde54e2c
authored
Feb 19, 2016
by
Gabriel Mazetto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added GeoBulkNotifyWorker to sidekiq-cron
parent
ca389e1f
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
2 deletions
+21
-2
app/workers/geo_bulk_notify_worker.rb
app/workers/geo_bulk_notify_worker.rb
+11
-0
app/workers/geo_repository_update_worker.rb
app/workers/geo_repository_update_worker.rb
+2
-2
config/gitlab.yml.example
config/gitlab.yml.example
+5
-0
config/initializers/1_settings.rb
config/initializers/1_settings.rb
+3
-0
No files found.
app/workers/geo_bulk_notify_worker.rb
0 → 100644
View file @
fde54e2c
class
GeoRepositoryUpdateWorker
include
Sidekiq
::
Worker
sidekiq_options
queue: :default
def
perform
return
unless
Gitlab
::
Geo
.
enabled?
Geo
::
NotifyNodesService
.
new
.
execute
end
end
app/workers/geo_repository_update_worker.rb
View file @
fde54e2c
...
...
@@ -2,9 +2,9 @@ class GeoRepositoryUpdateWorker
include
Sidekiq
::
Worker
include
Gitlab
::
ShellAdapter
sidekiq_options
queue: :
gitlab_shell
sidekiq_options
queue: :
default
attr_accessor
:project
,
:repository
,
:current_user
attr_accessor
:project
def
perform
(
project_id
)
@project
=
Project
.
find
(
project_id
)
...
...
config/gitlab.yml.example
View file @
fde54e2c
...
...
@@ -196,6 +196,11 @@ production: &base
ldap_sync_worker:
cron: "30 1 * * *"
# Gitlab Geo nodes notification worker
# NOTE: This will only take effect if Geo is enabled
geo_bulk_notify_worker:
cron: "*/10 * * * * *"
#
# 2. GitLab CI settings
...
...
config/initializers/1_settings.rb
View file @
fde54e2c
...
...
@@ -331,6 +331,9 @@ Settings.cron_jobs['update_all_mirrors_worker']['job_class'] = 'UpdateAllMirrors
Settings
.
cron_jobs
[
'ldap_sync_worker'
]
||=
Settingslogic
.
new
({})
Settings
.
cron_jobs
[
'ldap_sync_worker'
][
'cron'
]
||=
'30 1 * * *'
Settings
.
cron_jobs
[
'ldap_sync_worker'
][
'job_class'
]
=
'LdapSyncWorker'
Settings
.
cron_jobs
[
'geo_bulk_notify_worker'
]
||=
Settingslogic
.
new
({})
Settings
.
cron_jobs
[
'geo_bulk_notify_worker'
][
'cron'
]
||=
'*/10 * * * * *'
Settings
.
cron_jobs
[
'geo_bulk_notify_worker'
][
'job_class'
]
||=
'GeoBulkNotifyWorker'
#
# GitLab Shell
...
...
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