Skip to content

Commit bbaf072

Browse files
⚠️ Remove the oldjson format from cron (#1920)
- removed the old json format from cron fix #1487 Signed-off-by: naveensrinivasan <[email protected]>
1 parent e7ef60d commit bbaf072

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

cron/worker/main.go

-7
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ func processRequest(ctx context.Context,
8080
return nil
8181
}
8282

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

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

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

0 commit comments

Comments
 (0)