Skip to content

Commit

Permalink
select all peers in one scheduler_cluster (#3503)
Browse files Browse the repository at this point in the history
old sql only select one item
  • Loading branch information
alohaHZ authored Sep 24, 2024
1 parent 5056506 commit 820e719
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion manager/job/sync_peers.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ func (s *syncPeers) mergePeers(ctx context.Context, scheduler models.Scheduler,
syncPeers[result.ID] = result
}

rows, err := s.db.Model(&models.Peer{}).Find(&models.Peer{SchedulerClusterID: scheduler.SchedulerClusterID}).Rows()
rows, err := s.db.Model(&models.Peer{}).Where("scheduler_cluster_id = ?",scheduler.SchedulerClusterID).Rows()
if err != nil {
log.Error(err)
return
Expand Down

0 comments on commit 820e719

Please sign in to comment.