mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-27 04:35:16 +01:00
update
This commit is contained in:
parent
19ec6177e0
commit
e2afc3e51c
@ -74,6 +74,17 @@ func (d *Deleter) Exit() error {
|
||||
|
||||
// Enter deletes repository or tags
|
||||
func (d *Deleter) Enter() (string, error) {
|
||||
state, err := d.enter()
|
||||
if err != nil && retry(err) {
|
||||
d.logger.Info("waiting for retrying...")
|
||||
return models.JobRetrying, nil
|
||||
}
|
||||
|
||||
return state, err
|
||||
|
||||
}
|
||||
|
||||
func (d *Deleter) enter() (string, error) {
|
||||
|
||||
if len(d.tags) == 0 {
|
||||
tags, err := d.dstClient.ListTag()
|
||||
|
@ -154,7 +154,8 @@ type Checker struct {
|
||||
func (c *Checker) Enter() (string, error) {
|
||||
state, err := c.enter()
|
||||
if err != nil && retry(err) {
|
||||
return models.JobRetrying, err
|
||||
c.logger.Info("waiting for retrying...")
|
||||
return models.JobRetrying, nil
|
||||
}
|
||||
|
||||
return state, err
|
||||
@ -328,7 +329,8 @@ type ManifestPuller struct {
|
||||
func (m *ManifestPuller) Enter() (string, error) {
|
||||
state, err := m.enter()
|
||||
if err != nil && retry(err) {
|
||||
return models.JobRetrying, err
|
||||
m.logger.Info("waiting for retrying...")
|
||||
return models.JobRetrying, nil
|
||||
}
|
||||
|
||||
return state, err
|
||||
@ -411,7 +413,8 @@ type BlobTransfer struct {
|
||||
func (b *BlobTransfer) Enter() (string, error) {
|
||||
state, err := b.enter()
|
||||
if err != nil && retry(err) {
|
||||
return models.JobRetrying, err
|
||||
b.logger.Info("waiting for retrying...")
|
||||
return models.JobRetrying, nil
|
||||
}
|
||||
|
||||
return state, err
|
||||
@ -446,10 +449,11 @@ type ManifestPusher struct {
|
||||
// Enter checks the existence of manifest in the source registry first, and if it
|
||||
// exists, pushs it to destination registry. The checking operation is to avoid
|
||||
// the situation that the tag is deleted during the blobs transfering
|
||||
func (b *ManifestPusher) Enter() (string, error) {
|
||||
state, err := b.enter()
|
||||
func (m *ManifestPusher) Enter() (string, error) {
|
||||
state, err := m.enter()
|
||||
if err != nil && retry(err) {
|
||||
return models.JobRetrying, err
|
||||
m.logger.Info("waiting for retrying...")
|
||||
return models.JobRetrying, nil
|
||||
}
|
||||
|
||||
return state, err
|
||||
|
Loading…
Reference in New Issue
Block a user