Commit b063b893 authored by Douwe Maan's avatar Douwe Maan
Browse files

Expect mirrors to update at least once every 30 minutes, and mirror updates to...

Expect mirrors to update at least once every 30 minutes, and mirror updates to be at most 10s overdue
parent a44278bb
Pipeline #79431 passed with stage
in 29 seconds
...@@ -36,15 +36,15 @@ module GitLab ...@@ -36,15 +36,15 @@ module GitLab
mirrors_not_updated_recently: MIRROR_QUERY.merge( # EE only mirrors_not_updated_recently: MIRROR_QUERY.merge( # EE only
where: <<~SQL where: <<~SQL
projects.import_status NOT IN ('scheduled', 'started') projects.import_status NOT IN ('scheduled', 'started')
AND (project_mirror_data.next_execution_timestamp - projects.mirror_last_update_at) <= '1 hour'::interval AND (project_mirror_data.next_execution_timestamp - projects.mirror_last_update_at) <= '30 minutes'::interval
AND projects.mirror_last_update_at < NOW() - '1 hour'::interval AND projects.mirror_last_update_at < NOW() - '30 minutes'::interval
AND #{WHERE_MIRROR_ENABLED} AND #{WHERE_MIRROR_ENABLED}
SQL SQL
), ),
mirrors_behind_schedule: MIRROR_QUERY.merge( # EE only mirrors_behind_schedule: MIRROR_QUERY.merge( # EE only
where: <<~SQL where: <<~SQL
projects.import_status NOT IN ('scheduled', 'started') projects.import_status NOT IN ('scheduled', 'started')
AND project_mirror_data.next_execution_timestamp <= NOW() - '10 minutes'::interval AND project_mirror_data.next_execution_timestamp <= NOW() - '10 seconds'::interval
AND #{WHERE_MIRROR_ENABLED} AND #{WHERE_MIRROR_ENABLED}
SQL SQL
), ),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment