mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-27 19:17:47 +01:00
do not trigger replication if the policy is disabled
This commit is contained in:
parent
14c28f9bee
commit
f685702475
@ -162,6 +162,9 @@ func TriggerReplicationByRepository(repository string, tags []string, operation
|
||||
}
|
||||
|
||||
for _, policy := range policies {
|
||||
if policy.Enabled == 0 {
|
||||
continue
|
||||
}
|
||||
if err := TriggerReplication(policy.ID, repository, tags, operation); err != nil {
|
||||
log.Errorf("failed to trigger replication of policy %d for %s: %v", policy.ID, repository, err)
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user