Skip to content

Commit

Permalink
update redis delay log
Browse files Browse the repository at this point in the history
  • Loading branch information
Intizar-T committed Jul 31, 2024
1 parent 98d1dab commit 916d4fb
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions node/pkg/dal/collector/collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,13 +160,9 @@ func (c *Collector) receiveEach(ctx context.Context, configId int32) error {
func (c *Collector) processIncomingData(ctx context.Context, data aggregator.SubmissionData) {
symbol := c.Symbols[data.GlobalAggregate.ConfigID]
diff := time.Since(data.GlobalAggregate.Timestamp)
if diff > 1*time.Second {
log.Warn().Dur("duration", diff).Str("Symbol", symbol).Str("Player", "DalCollector").Msg("processing incoming data")
}

diffFromPublish := time.Since(data.PublishTime)
if diffFromPublish > 3*time.Second {
log.Warn().Dur("time between Publish and processIncomingData", diffFromPublish).Str("Symbol", symbol).Str("Player", "DalCollector")
if diffFromPublish >= 3*time.Second || diff >= 3*time.Second {
log.Warn().Dur("dataDiff", diff).Dur("diffFromPublish", diffFromPublish).Str("Symbol", symbol).Str("Player", "DalCollector")
}

result, err := c.IncomingDataToOutgoingData(ctx, data)
Expand Down

0 comments on commit 916d4fb

Please sign in to comment.