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
a9e7b603
Commit
a9e7b603
authored
Jul 09, 2020
by
João Pereira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Periodically update container registry type settings
parent
f8ab8d57
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
420 additions
and
374 deletions
+420
-374
app/workers/all_queues.yml
app/workers/all_queues.yml
+382
-374
app/workers/update_container_registry_info_worker.rb
app/workers/update_container_registry_info_worker.rb
+15
-0
changelogs/unreleased/204839-move-update-logic-to-service.yml
...gelogs/unreleased/204839-move-update-logic-to-service.yml
+5
-0
config/initializers/1_settings.rb
config/initializers/1_settings.rb
+3
-0
spec/workers/update_container_registry_info_worker_spec.rb
spec/workers/update_container_registry_info_worker_spec.rb
+15
-0
No files found.
app/workers/all_queues.yml
View file @
a9e7b603
This diff is collapsed.
Click to expand it.
app/workers/update_container_registry_info_worker.rb
0 → 100644
View file @
a9e7b603
# frozen_string_literal: true
class
UpdateContainerRegistryInfoWorker
include
ApplicationWorker
include
CronjobQueue
# rubocop:disable Scalability/CronWorkerContext
feature_category
:container_registry
urgency
:low
idempotent!
def
perform
UpdateContainerRegistryInfoService
.
new
.
execute
end
end
changelogs/unreleased/204839-move-update-logic-to-service.yml
0 → 100644
View file @
a9e7b603
---
title
:
Periodically update container registry type settings
merge_request
:
36415
author
:
type
:
added
config/initializers/1_settings.rb
View file @
a9e7b603
...
...
@@ -500,6 +500,9 @@ Settings.cron_jobs['users_create_statistics_worker']['job_class'] = 'Users::Crea
Settings
.
cron_jobs
[
'authorized_project_update_periodic_recalculate_worker'
]
||=
Settingslogic
.
new
({})
Settings
.
cron_jobs
[
'authorized_project_update_periodic_recalculate_worker'
][
'cron'
]
||=
'45 1 * * 6'
Settings
.
cron_jobs
[
'authorized_project_update_periodic_recalculate_worker'
][
'job_class'
]
=
'AuthorizedProjectUpdate::PeriodicRecalculateWorker'
Settings
.
cron_jobs
[
'update_container_registry_info_worker'
]
||=
Settingslogic
.
new
({})
Settings
.
cron_jobs
[
'update_container_registry_info_worker'
][
'cron'
]
||=
'0 0 * * *'
Settings
.
cron_jobs
[
'update_container_registry_info_worker'
][
'job_class'
]
=
'UpdateContainerRegistryInfoWorker'
Gitlab
.
ee
do
Settings
.
cron_jobs
[
'adjourned_group_deletion_worker'
]
||=
Settingslogic
.
new
({})
...
...
spec/workers/update_container_registry_info_worker_spec.rb
0 → 100644
View file @
a9e7b603
# frozen_string_literal: true
require
'spec_helper'
RSpec
.
describe
UpdateContainerRegistryInfoWorker
do
describe
'#perform'
do
it
'calls UpdateContainerRegistryInfoService'
do
expect_next_instance_of
(
UpdateContainerRegistryInfoService
)
do
|
service
|
expect
(
service
).
to
receive
(
:execute
)
end
subject
.
perform
end
end
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