OSDN Git Service

fox
authorHAOYUatHZ <haoyu@protonmail.com>
Wed, 28 Aug 2019 03:21:08 +0000 (11:21 +0800)
committerHAOYUatHZ <haoyu@protonmail.com>
Wed, 28 Aug 2019 03:21:08 +0000 (11:21 +0800)
toolbar/precog/monitor/stats.go

index 684c0c6..eb7c7e7 100644 (file)
@@ -148,7 +148,7 @@ func (m *monitor) processPeerInfo(dbTx *gorm.DB, peerInfo *peers.PeerInfo) error
        if err := dbTx.Model(&orm.NodeLiveness{}).
                Where("node_id = ? AND updated_at > ?", ormNode.ID, time.Now().Add(-24*time.Hour)).
                Order(fmt.Sprintf("created_at", "DESC")).
-               Find(ormNodeLivenesses).Error; err != nil {
+               Find(&ormNodeLivenesses).Error; err != nil {
                return err
        }