Commit a44278bb authored by Ahmad Sherif's avatar Ahmad Sherif
Browse files

Merge branch 'dm-mirrors_not_updated_recently' into 'master'

Only include mirrors that were actually scheduled to update within an hour

See merge request gitlab-org/gitlab-monitor!64
parents 6896d6ba e45e88d3
Pipeline #78755 passed with stage
in 35 seconds
PATH
remote: .
specs:
gitlab-monitor (2.7.0)
gitlab-monitor (2.9.0)
connection_pool (~> 2.2.1)
pg (~> 0.18.4)
quantile (~> 0.2.0)
......
......@@ -36,6 +36,7 @@ module GitLab
mirrors_not_updated_recently: MIRROR_QUERY.merge( # EE only
where: <<~SQL
projects.import_status NOT IN ('scheduled', 'started')
AND (project_mirror_data.next_execution_timestamp - projects.mirror_last_update_at) <= '1 hour'::interval
AND projects.mirror_last_update_at < NOW() - '1 hour'::interval
AND #{WHERE_MIRROR_ENABLED}
SQL
......
module GitLab
module Monitor
VERSION = "2.8.0".freeze
VERSION = "2.9.0".freeze
end
end
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