mirror of
https://github.com/harness/drone.git
synced 2025-05-20 19:09:59 +08:00
commit
aadcde2b2c
@ -159,9 +159,13 @@ func PostHook(c *gin.Context) {
|
|||||||
}
|
}
|
||||||
err = Config.Storage.Config.ConfigCreate(conf)
|
err = Config.Storage.Config.ConfigCreate(conf)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logrus.Errorf("failure to persist config for %s. %s", repo.FullName, err)
|
// retry in case we receive two hooks at the same time
|
||||||
c.AbortWithError(500, err)
|
conf, err = Config.Storage.Config.ConfigFind(repo, sha)
|
||||||
return
|
if err != nil {
|
||||||
|
logrus.Errorf("failure to find or persist build config for %s. %s", repo.FullName, err)
|
||||||
|
c.AbortWithError(500, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
build.ConfigID = conf.ID
|
build.ConfigID = conf.ID
|
||||||
|
Loading…
Reference in New Issue
Block a user