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
87ef992d
Commit
87ef992d
authored
Feb 15, 2017
by
Tiago Botelho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add changelog entry
parent
bc510c29
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
5 deletions
+9
-5
changelogs/unreleased-ee/global-minimum-mirror-sync-time.yml
changelogs/unreleased-ee/global-minimum-mirror-sync-time.yml
+4
-0
config/initializers/sidekiq.rb
config/initializers/sidekiq.rb
+0
-3
lib/gitlab/mirror.rb
lib/gitlab/mirror.rb
+5
-2
No files found.
changelogs/unreleased-ee/global-minimum-mirror-sync-time.yml
0 → 100644
View file @
87ef992d
---
title
:
Add configurable minimum mirror sync time in admin section
merge_request
:
1217
author
:
config/initializers/sidekiq.rb
View file @
87ef992d
require
'gitlab/current_settings'
include
Gitlab
::
CurrentSettings
# Custom Redis configuration
redis_config_hash
=
Gitlab
::
Redis
.
params
redis_config_hash
[
:namespace
]
=
Gitlab
::
Redis
::
SIDEKIQ_NAMESPACE
...
...
lib/gitlab/mirror.rb
View file @
87ef992d
module
Gitlab
module
Mirror
include
Gitlab
::
CurrentSettings
FIFTEEN
=
15
HOURLY
=
60
DAILY
=
1440
...
...
@@ -31,6 +33,7 @@ module Gitlab
def
configure_cron_jobs!
minimum_mirror_sync_time
=
current_application_settings
.
minimum_mirror_sync_time
rescue
DAILY
sync_time
=
SYNC_TIME_TO_CRON
[
minimum_mirror_sync_time
]
update_all_mirrors_worker_job
=
Sidekiq
::
Cron
::
Job
.
find
(
"update_all_mirrors_worker"
)
update_all_remote_mirrors_worker_job
=
Sidekiq
::
Cron
::
Job
.
find
(
"update_all_remote_mirrors_worker"
)
...
...
@@ -41,12 +44,12 @@ module Gitlab
Sidekiq
::
Cron
::
Job
.
create
(
name:
'update_all_remote_mirrors_worker'
,
cron:
SYNC_TIME_TO_CRON
[
minimum_mirror_sync_time
]
,
cron:
sync_time
,
class:
'UpdateAllRemoteMirrorsWorker'
)
Sidekiq
::
Cron
::
Job
.
create
(
name:
'update_all_mirrors_worker'
,
cron:
SYNC_TIME_TO_CRON
[
minimum_mirror_sync_time
]
,
cron:
sync_time
,
class:
'UpdateAllMirrorsWorker'
)
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