Skip to content

Commit

Permalink
bug: fixes overwriting the sf bundles during export #309
Browse files Browse the repository at this point in the history
  • Loading branch information
srinandan committed Oct 5, 2023
1 parent 598d6f5 commit 18c6402
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/client/sharedflows/sharedflows.go
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ func Export(conn int, folder string, allRevisions bool) (err error) {

for i := 0; i < conn; i++ {
fanOutWg.Add(1)
go exportSharedFlows(&fanOutWg, jobChan, folder, errChan)
go exportSharedFlows(&fanOutWg, jobChan, folder, allRevisions, errChan)
}

for _, proxy := range shrdflows.Flows {
Expand All @@ -357,14 +357,14 @@ func Export(conn int, folder string, allRevisions bool) (err error) {
return nil
}

func exportSharedFlows(wg *sync.WaitGroup, jobs <-chan revision, folder string, errs chan<- error) {
func exportSharedFlows(wg *sync.WaitGroup, jobs <-chan revision, folder string, allRevisions bool, errs chan<- error) {
defer wg.Done()
for {
job, ok := <-jobs
if !ok {
return
}
err := apiclient.FetchBundle("sharedflows", folder, job.name, job.rev, false)
err := apiclient.FetchBundle("sharedflows", folder, job.name, job.rev, allRevisions)
if err != nil {
errs <- err
}
Expand Down

0 comments on commit 18c6402

Please sign in to comment.