Skip to content
Merged
Show file tree
Hide file tree
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
6 changes: 4 additions & 2 deletions api/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ import (
"github.com/mcuadros/go-defaults"
"github.com/segmentio/encoding/json"
"go.uber.org/zap"
"go.uber.org/zap/zapcore"
)

//go:embed swagger/swagger-v1.yaml
Expand Down Expand Up @@ -375,7 +376,8 @@ func NewApiServer(config config.Config) *ApiServer {

return fields
},
Fields: []string{"status", "method", "url", "route"},
Fields: []string{"status", "method", "path", "route"},
Levels: []zapcore.Level{zapcore.ErrorLevel, zapcore.WarnLevel, zapcore.DebugLevel},
}))
}

Expand Down Expand Up @@ -529,7 +531,7 @@ func NewApiServer(config config.Config) *ApiServer {
g.Get("/tracks/unclaimed_id", app.v1TracksUnclaimedId)

g.Get("/tracks/latest", app.v1TracksLatest)
g.Get("/tracks/trending", app.v1TracksTrending)
g.Get("/tracks/trending", app.v1TracksTrending)
g.Get("/tracks/trending/ids", app.v1TracksTrendingIds)
g.Get("/tracks/trending/winners", app.v1TracksTrendingWinners)
g.Get("/tracks/trending/underground", app.v1TracksTrendingUnderground)
Expand Down
4 changes: 2 additions & 2 deletions esindexer/esindexer.go
Original file line number Diff line number Diff line change
Expand Up @@ -219,10 +219,10 @@ func (indexer *EsIndexer) scriptedUpdateSocial(userId int64, fieldName string, e
if err := indexer.indexIds("socials", userId); err != nil {
slog.Error("socials indexIds failed", "user", userId, "field", fieldName, "id", entityId, "err", err)
} else {
slog.Info("socials indexIds", "user", userId, "field", fieldName, "id", entityId)
slog.Debug("socials indexIds", "user", userId, "field", fieldName, "id", entityId)
}
} else {
slog.Info("social update", "user", userId, "field", fieldName, "id", entityId)
slog.Debug("social update", "user", userId, "field", fieldName, "id", entityId)
}

}
10 changes: 9 additions & 1 deletion solana/indexer/solana_indexer.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ func (s *SolanaIndexer) ProcessRetryQueue(ctx context.Context) {
offset := 0
logger := s.logger.Named("RetryQueue")
count := 0
failedByIndexer := map[string]int{}
start := time.Now()
logger.Debug("starting to process retry queue...")
for {
Expand All @@ -217,7 +218,8 @@ func (s *SolanaIndexer) ProcessRetryQueue(ctx context.Context) {
}
err := indexer.HandleUpdate(ctx, item.UpdateMessage.SubscribeUpdate)
if err != nil {
logger.Error("failed to retry", zap.String("indexer", locker.NAME), zap.Error(err))
logger.Debug("retry queue item failed", zap.String("indexer", item.Indexer), zap.Error(err))
failedByIndexer[item.Indexer]++
offset++
} else {
err = common.DeleteFromRetryQueue(ctx, s.pool, item.ID)
Expand All @@ -234,6 +236,12 @@ func (s *SolanaIndexer) ProcessRetryQueue(ctx context.Context) {
return
}

if len(failedByIndexer) > 0 {
logger.Warn("retry queue items failed",
zap.Int("failed", offset),
zap.Any("failed_by_indexer", failedByIndexer))
}

logger.Info("finished processing retry queue",
zap.Int("count", count),
zap.Int("failed", offset),
Expand Down
Loading