Skip to content

Commit

Permalink
⚠️ Remove the oldjson format from cron
Browse files Browse the repository at this point in the history
- removed the old json format from cron
fix #1487

Signed-off-by: naveensrinivasan <[email protected]>
  • Loading branch information
naveensrinivasan committed May 17, 2022
1 parent e7ef60d commit 7898a47
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions cron/worker/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ func processRequest(ctx context.Context,
return nil
}

var buffer bytes.Buffer
var buffer2 bytes.Buffer
var rawBuffer bytes.Buffer
// TODO: run Scorecard for each repo in a separate thread.
Expand Down Expand Up @@ -130,9 +129,6 @@ func processRequest(ctx context.Context,
logger.Info(errorMsg)
}
result.Date = batchRequest.GetJobTime().AsTime()
if err := format.AsJSON(&result, true /*showDetails*/, log.InfoLevel, &buffer); err != nil {
return fmt.Errorf("error during result.AsJSON: %w", err)
}

if err := format.AsJSON2(&result, true /*showDetails*/, log.InfoLevel, checkDocs, &buffer2); err != nil {
return fmt.Errorf("error during result.AsJSON2: %w", err)
Expand All @@ -143,9 +139,6 @@ func processRequest(ctx context.Context,
return fmt.Errorf("error during result.AsRawJSON: %w", err)
}
}
if err := data.WriteToBlobStore(ctx, bucketURL, filename, buffer.Bytes()); err != nil {
return fmt.Errorf("error during WriteToBlobStore: %w", err)
}

if err := data.WriteToBlobStore(ctx, bucketURL2, filename, buffer2.Bytes()); err != nil {
return fmt.Errorf("error during WriteToBlobStore2: %w", err)
Expand Down

0 comments on commit 7898a47

Please sign in to comment.