Skip to content

Commit

Permalink
fix create consumer nats with consumer group that was destroyed before
Browse files Browse the repository at this point in the history
  • Loading branch information
shohamroditimemphis committed Jan 22, 2024
1 parent df6d315 commit fe76d94
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion db/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -3013,7 +3013,7 @@ func GetActiveConsumerByCG(consumersGroup string, stationId int) (bool, models.C
}
defer conn.Release()

query := `SELECT * FROM consumers WHERE consumers_group = $1 AND station_id = $2 AND type = 'application' LIMIT 1`
query := `SELECT * FROM consumers WHERE consumers_group = $1 AND station_id = $2 AND type = 'application' AND is_active = true LIMIT 1`
stmt, err := conn.Conn().Prepare(ctx, "get_active_consumer_by_cg", query)
if err != nil {
return false, models.Consumer{}, err
Expand Down

0 comments on commit fe76d94

Please sign in to comment.