Skip to content

Commit

Permalink
v2 pass on concurrency fix
Browse files Browse the repository at this point in the history
  • Loading branch information
thesilentg committed Jul 21, 2024
1 parent e9b462f commit 6627f9f
Show file tree
Hide file tree
Showing 2 changed files with 180 additions and 157 deletions.
6 changes: 1 addition & 5 deletions internal/examples/simplejob/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"bytes"
"context"
"encoding/json"
"io"
"log"
"log/slog"
"math/rand"
Expand Down Expand Up @@ -79,8 +78,5 @@ func (f *fileListener) StatusUpdate(status []jorb.StatusCount) {
encoder.SetIndent("", " ")
_ = encoder.Encode(status)

file, _ := os.Create(f.fileName)
defer file.Close()

_, _ = io.Copy(file, buf)
_ = os.WriteFile(f.fileName, buf.Bytes(), 0644)
}
Loading

0 comments on commit 6627f9f

Please sign in to comment.