mirror of
https://github.com/samuelncui/yatm.git
synced 2026-01-03 11:45:21 +00:00
fix: report write panic
This commit is contained in:
@@ -246,7 +246,9 @@ func (a *jobArchiveExecutor) makeTape(ctx context.Context, device, barcode, name
|
||||
a.logger.WithContext(ctx).WithError(err).Warnf("open report file fail, barcode= '%s'", barcode)
|
||||
} else {
|
||||
defer reportFile.Close()
|
||||
reportFile.Write([]byte(report.ToJSONString(false)))
|
||||
tools.Wrap(ctx, func() {
|
||||
reportFile.Write([]byte(report.ToJSONString(false)))
|
||||
})
|
||||
}
|
||||
|
||||
filteredJobs := make([]*acp.Job, 0, len(report.Jobs))
|
||||
|
||||
Reference in New Issue
Block a user