summaryrefslogtreecommitdiffstats
path: root/models/webhook.go
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-12-05 13:24:13 -0500
committerUnknwon <u@gogs.io>2015-12-05 13:24:13 -0500
commit404867f206f97ec4ea2e6032fea47bc0499d3497 (patch)
treeb37be9387d2a00cd2447e65a1367bb292c6c0a09 /models/webhook.go
parentf0ee33267c453cc7f77a87a2b4b784febbb604dd (diff)
downloadgitea-404867f206f97ec4ea2e6032fea47bc0499d3497.tar.gz
gitea-404867f206f97ec4ea2e6032fea47bc0499d3497.zip
fix #2105 and fix #1857
Diffstat (limited to 'models/webhook.go')
-rw-r--r--models/webhook.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/models/webhook.go b/models/webhook.go
index cbc874a9ce..6d451f4eb6 100644
--- a/models/webhook.go
+++ b/models/webhook.go
@@ -335,7 +335,7 @@ func (t *HookTask) AfterSet(colName string, _ xorm.Cell) {
t.ResponseInfo = &HookResponse{}
if err = json.Unmarshal([]byte(t.ResponseContent), t.ResponseInfo); err != nil {
- log.Error(3, "Unmarshal[%d]: %v", t.ID, err)
+ log.Error(3, "Unmarshal [%d]: %v", t.ID, err)
}
}
}
@@ -343,7 +343,7 @@ func (t *HookTask) AfterSet(colName string, _ xorm.Cell) {
func (t *HookTask) MarshalJSON(v interface{}) string {
p, err := json.Marshal(v)
if err != nil {
- log.Error(3, "Marshal[%d]: %v", t.ID, err)
+ log.Error(3, "Marshal [%d]: %v", t.ID, err)
}
return string(p)
}
@@ -590,24 +590,24 @@ func DeliverHooks() {
// Update hook task status.
for _, t := range tasks {
if err := UpdateHookTask(t); err != nil {
- log.Error(4, "UpdateHookTask(%d): %v", t.ID, err)
+ log.Error(4, "UpdateHookTask [%d]: %v", t.ID, err)
}
}
// Start listening on new hook requests.
for repoID := range HookQueue.Queue() {
- log.Trace("DeliverHooks[%v]: processing delivery hooks", repoID)
+ log.Trace("DeliverHooks [%v]: processing delivery hooks", repoID)
HookQueue.Remove(repoID)
tasks = make([]*HookTask, 0, 5)
if err := x.Where("repo_id=? AND is_delivered=?", repoID, false).Find(&tasks); err != nil {
- log.Error(4, "Get repository(%d) hook tasks: %v", repoID, err)
+ log.Error(4, "Get repository [%d] hook tasks: %v", repoID, err)
continue
}
for _, t := range tasks {
t.deliver()
if err := UpdateHookTask(t); err != nil {
- log.Error(4, "UpdateHookTask[%d]: %v", t.ID, err)
+ log.Error(4, "UpdateHookTask [%d]: %v", t.ID, err)
continue
}
}