Skip to content

Commit

Permalink
Appease go vet
Browse files Browse the repository at this point in the history
  • Loading branch information
2opremio committed Jun 23, 2020
1 parent 75270a7 commit a56a33d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions services/horizon/cmd/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,9 @@ var dbReingestRangeCmd = &cobra.Command{
}

if parallelWorkers < 2 {
system, err := expingest.NewSystem(ingestConfig)
system, systemErr := expingest.NewSystem(ingestConfig)
if err != nil {
log.Fatal(err)
log.Fatal(systemErr)
}

err = system.ReingestRange(
Expand All @@ -209,9 +209,9 @@ var dbReingestRangeCmd = &cobra.Command{
reingestForce,
)
} else {
system, err := expingest.NewParallelSystems(ingestConfig, parallelWorkers)
system, systemErr := expingest.NewParallelSystems(ingestConfig, parallelWorkers)
if err != nil {
log.Fatal(err)
log.Fatal(systemErr)
}
defer system.Shutdown()

Expand Down
6 changes: 3 additions & 3 deletions services/horizon/internal/expingest/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -475,12 +475,12 @@ func (ps *ParallelSystems) work(s System) {
select {
case <-ps.shutdown:
return
case ledgerRange := <-ps.reingestJobQueue:
err := s.ReingestRange(ledgerRange.from, ledgerRange.to, false)
case reingestRange := <-ps.reingestJobQueue:
err := s.ReingestRange(reingestRange.from, reingestRange.to, false)
select {
case <-ps.shutdown:
return
case ps.reingestJobResult <- rangeResult{err, ledgerRange}:
case ps.reingestJobResult <- rangeResult{err, reingestRange}:
}
}
}
Expand Down

0 comments on commit a56a33d

Please sign in to comment.