aboutsummaryrefslogtreecommitdiffstats
path: root/bridge/github/export.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2022-06-06 12:54:20 +0200
committerGitHub <noreply@github.com>2022-06-06 12:54:20 +0200
commitee0bac6b54e28bb52cbe18332fec84bdefb37194 (patch)
tree9425ff5ef9a54f2dc1ba23149b73d70d84c70923 /bridge/github/export.go
parentc2d7b1271f9dc2df3a752b73bc7fd26dbeeb10c0 (diff)
parent7348fb9edb68ca9142f5d87673da48cef733b3d3 (diff)
downloadgit-bug-ee0bac6b54e28bb52cbe18332fec84bdefb37194.tar.gz
Merge pull request #813 from MichaelMure/fix-data-race2
Github: fix data race
Diffstat (limited to 'bridge/github/export.go')
-rw-r--r--bridge/github/export.go15
1 files changed, 1 insertions, 14 deletions
diff --git a/bridge/github/export.go b/bridge/github/export.go
index 8c40eb74..35d456c2 100644
--- a/bridge/github/export.go
+++ b/bridge/github/export.go
@@ -486,23 +486,10 @@ func (ge *githubExporter) cacheGithubLabels(ctx context.Context, gc *rateLimitHa
}
q := labelsQuery{}
- // When performing the queries we have to forward rate limiting events to the
- // current channel of export results.
- events := make(chan RateLimitingEvent)
- defer close(events)
- go func() {
- for e := range events {
- select {
- case <-ctx.Done():
- return
- case ge.out <- core.NewExportRateLimiting(e.msg):
- }
- }
- }()
hasNextPage := true
for hasNextPage {
- if err := gc.queryWithLimitEvents(ctx, &q, variables, events); err != nil {
+ if err := gc.queryExport(ctx, &q, variables, ge.out); err != nil {
return err
}