Skip to content

Commit

Permalink
Always exit from tc collector in case of error to avoid hanging jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
MaXal committed Jul 11, 2023
1 parent c1c547b commit 8480fec
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions cmd/tc-collector/main.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
package main

import (
"context"
"encoding/json"
"errors"
"flag"
"github.com/JetBrains/ij-perf-report-aggregator/pkg/util"
"github.com/araddon/dateparse"
Expand All @@ -27,10 +25,8 @@ func main() {

err := configureCollectFromTeamCity(logger)
if err != nil {
if errors.Is(err, context.Canceled) {
os.Exit(78)
}
logger.Fatal("cannot collect", zap.Error(err))
os.Exit(78)
}
}

Expand Down

0 comments on commit 8480fec

Please sign in to comment.