mirror of
https://github.com/logos-messaging/storenode-messages-counter.git
synced 2026-01-02 14:13:11 +00:00
fix: contraint conflict
This commit is contained in:
parent
4378920387
commit
872df40bba
@ -534,7 +534,10 @@ func (app *Application) fetchStoreNodeMessages(ctx context.Context, runId string
|
||||
cursorLogger.Error("could not query storenode", zap.Error(err))
|
||||
time.Sleep(2 * time.Second)
|
||||
} else {
|
||||
cursorLogger.Info("more messages available", zap.Int("len", len(result.Messages())))
|
||||
msgLen := len(result.Messages())
|
||||
if msgLen != 0 {
|
||||
cursorLogger.Info("more messages available", zap.Int("len", msgLen))
|
||||
}
|
||||
retry = false
|
||||
success = true
|
||||
}
|
||||
|
||||
@ -279,7 +279,7 @@ func (d *DBStore) GetMissingMessages(from time.Time, to time.Time) (map[peer.ID]
|
||||
}
|
||||
|
||||
func (d *DBStore) UpdateTopicSyncState(tx *sql.Tx, topic string, lastSyncTimestamp time.Time) error {
|
||||
_, err := tx.Exec("INSERT INTO syncTopicStatus(fleet, clusterId, pubsubTopic, lastSyncTimestamp) VALUES ($1, $2, $3, $4) ON CONFLICT(fleet, clusterId, pubsubTopic) DO UPDATE SET lastSyncTimestamp = $5", d.fleetName, d.clusterID, topic, lastSyncTimestamp.UnixNano(), lastSyncTimestamp.UnixNano())
|
||||
_, err := tx.Exec("INSERT INTO syncTopicStatus(fleet, clusterId, pubsubTopic, lastSyncTimestamp) VALUES ($1, $2, $3, $4) ON CONFLICT(clusterId, pubsubTopic) DO UPDATE SET lastSyncTimestamp = $5", d.fleetName, d.clusterID, topic, lastSyncTimestamp.UnixNano(), lastSyncTimestamp.UnixNano())
|
||||
return err
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user