do not trigger replication if the policy is disabled

This commit is contained in:
Wenkai Yin 2016-07-13 17:19:23 +08:00
parent 14c28f9bee
commit f685702475

View File

@ -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 {