diff options
author | zeripath <art27@cantab.net> | 2022-06-17 22:47:15 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-17 22:47:15 +0100 |
commit | ae446b13f938948c3f9305635621f3af11a5c04c (patch) | |
tree | bd67f473052576a469738592b87b4a7133bb8dc7 /modules | |
parent | 5d80feb5a6afebd313ed3c17d45920adfadb6af4 (diff) | |
download | gitea-ae446b13f938948c3f9305635621f3af11a5c04c.tar.gz gitea-ae446b13f938948c3f9305635621f3af11a5c04c.zip |
Stop spurious APIFormat stopwatches logs (#20008)
If there are dangling stopwatches with missing issues there will be repeated
logging of Unable to APIFormat stopwatches. These are unhelpful and instead
we should only log if the error is not an issue not exist error.
And we should also prevent an error on missing issue in GetActiveStopwatch too
Signed-off-by: Andrew Thornton <art27@cantab.net>
Diffstat (limited to 'modules')
-rw-r--r-- | modules/eventsource/manager_run.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/eventsource/manager_run.go b/modules/eventsource/manager_run.go index 6055cf7232..06d48454fd 100644 --- a/modules/eventsource/manager_run.go +++ b/modules/eventsource/manager_run.go @@ -94,7 +94,9 @@ loop: for _, userStopwatches := range usersStopwatches { apiSWs, err := convert.ToStopWatches(userStopwatches.StopWatches) if err != nil { - log.Error("Unable to APIFormat stopwatches: %v", err) + if !issues_model.IsErrIssueNotExist(err) { + log.Error("Unable to APIFormat stopwatches: %v", err) + } continue } dataBs, err := json.Marshal(apiSWs) |