Commit 9b351e31 authored by Nick Thomas's avatar Nick Thomas

Mirrors should not attempt to sync while pending delete

parent 43214fd0
...@@ -78,6 +78,7 @@ class RemoteMirror < ActiveRecord::Base ...@@ -78,6 +78,7 @@ class RemoteMirror < ActiveRecord::Base
def sync def sync
return unless project && enabled return unless project && enabled
return if project.pending_delete?
return if Gitlab::Geo.secondary? return if Gitlab::Geo.secondary?
RepositoryUpdateRemoteMirrorWorker.perform_in(BACKOFF_DELAY, self.id, Time.now) if project&.repository_exists? RepositoryUpdateRemoteMirrorWorker.perform_in(BACKOFF_DELAY, self.id, Time.now) if project&.repository_exists?
......
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