Skip to content
Snippets Groups Projects
Commit ca02b796 authored by Robert Speicher's avatar Robert Speicher
Browse files

Update UpdateAllMirrorsWorker to respect update frequencies

It now runs every 15 minutes by default.
parent 86b41929
Branches andrey-remove-group-caching
No related tags found
1 merge request!299WIP: Support configurable mirror update frequency
Pipeline #12834544 failed
Loading
Loading
@@ -4,7 +4,7 @@ class UpdateAllMirrorsWorker
def perform
fail_stuck_mirrors!
 
Project.mirror.each(&:update_mirror)
Project.mirror.each { |project| project.update_mirror(force: false) }
end
 
def fail_stuck_mirrors!
Loading
Loading
Loading
Loading
@@ -186,9 +186,10 @@ production: &base
historical_data_worker:
cron: "0 12 * * *"
 
# Update mirrored repositories
# Update repository mirrors, if necessary, every 15 minutes. Mirrors with an
# update frequency higher than 15 minutes will only be updated as-needed.
update_all_mirrors_worker:
cron: "0 * * * *"
cron: "*/15 * * * *"
 
# In addition to refreshing users when they log in,
# periodically refresh LDAP users membership.
Loading
Loading
Loading
Loading
@@ -14,7 +14,8 @@
create(:empty_project, :mirror)
create(:empty_project)
 
expect_any_instance_of(Project).to receive(:update_mirror).once
expect_any_instance_of(Project).
to receive(:update_mirror).with(force: false).once
 
described_class.new.perform
end
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment