mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-23 17:17:46 +01:00
Merge pull request #481 from ywk253100/retry
Retry the job which failed because the network error
This commit is contained in:
commit
c6cc4e0c22
@ -23,7 +23,7 @@ func retry(err error) bool {
|
||||
if err == nil {
|
||||
return false
|
||||
}
|
||||
return isTemporary(err)
|
||||
return isNetworkErr(err)
|
||||
}
|
||||
|
||||
func isTemporary(err error) bool {
|
||||
@ -32,3 +32,8 @@ func isTemporary(err error) bool {
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func isNetworkErr(err error) bool {
|
||||
_, ok := err.(net.Error)
|
||||
return ok
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user