Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ignore updated_at field from indexer tables in node response #1329

Merged
merged 1 commit into from
Feb 25, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions grid-proxy/pkg/types/indexer.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ type NodeGPU struct {
Vendor string `json:"vendor"`
Device string `json:"device"`
Contract int `json:"contract"`
UpdatedAt int64 `json:"updated_at"`
UpdatedAt int64 `json:"updated_at,omitempty"`
}

func (NodeGPU) TableName() string {
Expand Down Expand Up @@ -45,7 +45,7 @@ type Speed struct {
NodeTwinId uint32 `json:"node_twin_id,omitempty" gorm:"unique;not null"`
Upload float64 `json:"upload"` // in bit/sec
Download float64 `json:"download"` // in bit/sec
UpdatedAt int64
UpdatedAt int64 `json:"updated_at,omitempty"`
}

func (Speed) TableName() string {
Expand All @@ -71,7 +71,7 @@ type Dmi struct {
Baseboard Baseboard `json:"baseboard" gorm:"type:jsonb;serializer:json"`
Processor []Processor `json:"processor" gorm:"type:jsonb;serializer:json"`
Memory []Memory `json:"memory" gorm:"type:jsonb;serializer:json"`
UpdatedAt int64
UpdatedAt int64 `json:"updated_at,omitempty"`
}

func (Dmi) TableName() string {
Expand Down Expand Up @@ -100,7 +100,7 @@ type Memory struct {

type NodeFeatures struct {
NodeTwinId uint32 `json:"node_twin_id,omitempty" gorm:"unique;not null"`
UpdatedAt int64 `json:"updated_at"`
UpdatedAt int64 `json:"updated_at,omitempty"`
Features []string `json:"features" gorm:"type:jsonb;serializer:json"`
}

Expand Down
Loading