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 {
return err
}
worker := newWorkerTimeout(client, w.Repo.Timeout+10) // 10 minute buffer
worker := newWorkerTimeout(client, w.Repo.Timeout)
workers = append(workers, worker)
cname := cname(task)
state, builderr := worker.Build(cname, in)

View file

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