Skip to content

Commit

Permalink
Merge branch 'master' into i287
Browse files Browse the repository at this point in the history
  • Loading branch information
rusq committed Dec 20, 2024
2 parents bdfc20e + 2ec0e64 commit 610cf75
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 3 additions & 2 deletions downloader/downloader.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,13 +144,14 @@ type Request struct {
func (c *Client) Start(ctx context.Context) {
c.mu.Lock()
defer c.mu.Unlock()
slog.Debug("starting downloader")

if c.started.CompareAndSwap(true, true) {
// already started
if c.started.Load() {
return
}
c.requests = make(chan Request, c.chanBufSz)
c.wg = c.startWorkers(ctx, c.requests)
c.started.Store(true)
}

// startWorkers starts download workers. It returns a sync.WaitGroup. If the
Expand Down
2 changes: 2 additions & 0 deletions internal/format/csv.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ func (c *CSV) Users(ctx context.Context, w io.Writer, users []slack.User) error
"Team ID",
"Name",
"Is Admin?",
"Last Updated",
"Is Deleted?",
"Is Bot?",
"Real Name",
Expand All @@ -139,6 +140,7 @@ func (c *CSV) Users(ctx context.Context, w io.Writer, users []slack.User) error
u.TeamID,
u.Name,
fb(u.IsAdmin),
u.Updated.Time().Format("2006-01-02 15:04:05"),
fb(u.Deleted),
fb(u.IsBot),
u.RealName,
Expand Down

0 comments on commit 610cf75

Please sign in to comment.