Merge pull request #13330 from mjtrangoni/fix-megacheck-issues
Fix megacheck issues
This commit is contained in:
@@ -48,11 +48,7 @@ func autoUpdateAppDashboard(pluginDashInfo *PluginDashboardInfoDTO, orgId int64)
|
|||||||
Path: pluginDashInfo.Path,
|
Path: pluginDashInfo.Path,
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := bus.Dispatch(&updateCmd); err != nil {
|
return bus.Dispatch(&updateCmd)
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func syncPluginDashboards(pluginDef *PluginBase, orgId int64) {
|
func syncPluginDashboards(pluginDef *PluginBase, orgId int64) {
|
||||||
|
|||||||
@@ -239,11 +239,8 @@ func RecordNotificationJournal(ctx context.Context, cmd *m.RecordNotificationJou
|
|||||||
Success: cmd.Success,
|
Success: cmd.Success,
|
||||||
}
|
}
|
||||||
|
|
||||||
if _, err := sess.Insert(journalEntry); err != nil {
|
_, err := sess.Insert(journalEntry)
|
||||||
return err
|
return err
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -144,7 +144,7 @@ func (c *baseClientImpl) encodeBatchRequests(requests []*multiRequest) ([]byte,
|
|||||||
payload.WriteString(body + "\n")
|
payload.WriteString(body + "\n")
|
||||||
}
|
}
|
||||||
|
|
||||||
elapsed := time.Now().Sub(start)
|
elapsed := time.Since(start)
|
||||||
clientLog.Debug("Encoded batch requests to json", "took", elapsed)
|
clientLog.Debug("Encoded batch requests to json", "took", elapsed)
|
||||||
|
|
||||||
return payload.Bytes(), nil
|
return payload.Bytes(), nil
|
||||||
@@ -187,7 +187,7 @@ func (c *baseClientImpl) executeRequest(method, uriPath string, body []byte) (*h
|
|||||||
|
|
||||||
start := time.Now()
|
start := time.Now()
|
||||||
defer func() {
|
defer func() {
|
||||||
elapsed := time.Now().Sub(start)
|
elapsed := time.Since(start)
|
||||||
clientLog.Debug("Executed request", "took", elapsed)
|
clientLog.Debug("Executed request", "took", elapsed)
|
||||||
}()
|
}()
|
||||||
return ctxhttp.Do(c.ctx, httpClient, req)
|
return ctxhttp.Do(c.ctx, httpClient, req)
|
||||||
@@ -215,7 +215,7 @@ func (c *baseClientImpl) ExecuteMultisearch(r *MultiSearchRequest) (*MultiSearch
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
elapsed := time.Now().Sub(start)
|
elapsed := time.Since(start)
|
||||||
clientLog.Debug("Decoded multisearch json response", "took", elapsed)
|
clientLog.Debug("Decoded multisearch json response", "took", elapsed)
|
||||||
|
|
||||||
msr.Status = res.StatusCode
|
msr.Status = res.StatusCode
|
||||||
|
|||||||
Reference in New Issue
Block a user