Use 5s backoff with 1m timeout fetching .drone.yml
This commit is contained in:
parent
956418cae9
commit
6397395570
1 changed files with 2 additions and 2 deletions
|
@ -103,12 +103,12 @@ func Perm(c context.Context, u *model.User, owner, repo string) (*model.Perm, er
|
|||
|
||||
// File fetches a file from the remote repository and returns in string format.
|
||||
func File(c context.Context, u *model.User, r *model.Repo, b *model.Build, f string) (out []byte, err error) {
|
||||
for i := 0; i < 5; i++ {
|
||||
for i := 0; i < 12; i++ {
|
||||
out, err = FromContext(c).File(u, r, b, f)
|
||||
if err == nil {
|
||||
return
|
||||
}
|
||||
time.Sleep(1 * time.Second)
|
||||
time.Sleep(5 * time.Second)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue