mirror of
https://github.com/go-gitea/gitea.git
synced 2024-08-25 21:44:20 -04:00
Fix SQL type error for webhooks (#3424)
This commit is contained in:
parent
e189b06baa
commit
3968c1149e
@ -20,6 +20,7 @@ import (
|
|||||||
"code.gitea.io/gitea/modules/util"
|
"code.gitea.io/gitea/modules/util"
|
||||||
api "code.gitea.io/sdk/gitea"
|
api "code.gitea.io/sdk/gitea"
|
||||||
|
|
||||||
|
"github.com/Unknwon/com"
|
||||||
gouuid "github.com/satori/go.uuid"
|
gouuid "github.com/satori/go.uuid"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -677,9 +678,15 @@ func DeliverHooks() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Start listening on new hook requests.
|
// Start listening on new hook requests.
|
||||||
for repoID := range HookQueue.Queue() {
|
for repoIDStr := range HookQueue.Queue() {
|
||||||
log.Trace("DeliverHooks [repo_id: %v]", repoID)
|
log.Trace("DeliverHooks [repo_id: %v]", repoIDStr)
|
||||||
HookQueue.Remove(repoID)
|
HookQueue.Remove(repoIDStr)
|
||||||
|
|
||||||
|
repoID, err := com.StrTo(repoIDStr).Int64()
|
||||||
|
if err != nil {
|
||||||
|
log.Error(4, "Invalid repo ID: %s", repoIDStr)
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
tasks = make([]*HookTask, 0, 5)
|
tasks = make([]*HookTask, 0, 5)
|
||||||
if err := x.Where("repo_id=? AND is_delivered=?", repoID, false).Find(&tasks); err != nil {
|
if err := x.Where("repo_id=? AND is_delivered=?", repoID, false).Find(&tasks); err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user