1
0
mirror of https://github.com/woodpecker-ci/woodpecker.git synced 2024-11-30 08:06:52 +02:00

sets default build timeout

This commit is contained in:
Brad Rydzewski 2015-05-15 17:19:15 -07:00
parent 6414d4e21e
commit 28061efeea
2 changed files with 3 additions and 1 deletions

View File

@ -120,7 +120,8 @@ func (r *Runner) Run(w *queue.Work) error {
if err != nil { if err != nil {
return err return err
} }
worker := newWorkerTimeout(client, w.Repo.Timeout+10) // 10 minute buffer
worker := newWorkerTimeout(client, w.Repo.Timeout)
workers = append(workers, worker) workers = append(workers, worker)
cname := cname(task) cname := cname(task)
state, builderr := worker.Build(cname, in) state, builderr := worker.Build(cname, in)

View File

@ -210,6 +210,7 @@ func PostRepo(c *gin.Context) {
r.UserID = user.ID r.UserID = user.ID
r.PostCommit = true r.PostCommit = true
r.PullRequest = true r.PullRequest = true
r.Timeout = 60 // 1 hour default build time
r.Self = fmt.Sprintf( r.Self = fmt.Sprintf(
"%s/%s", "%s/%s",
httputil.GetURL(c.Request), httputil.GetURL(c.Request),