Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
safeer committed Nov 5, 2024
1 parent 2dfafbd commit c1ddc5a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
10 changes: 4 additions & 6 deletions backend/controller/pubsub/internal/dal/dal.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,17 +150,15 @@ func (d *DAL) ProgressSubscriptions(ctx context.Context, eventConsumptionDelay t
return 0, err
}
if !nextCursor.Ready {
s := fmt.Sprintf("Skipping subscription %s because event is too new", subscription.Key)
logger.Tracef(s)
enqueueTimelineEvent(optional.None[schema.RefKey](), optional.Some(s))
logger.Tracef("Skipping subscription %s because event is too new", subscription.Key)
enqueueTimelineEvent(optional.None[schema.RefKey](), optional.Some(fmt.Sprintf("Skipping subscription %s because event is too new", subscription.Key)))
continue
}

subscriber, err := tx.db.GetRandomSubscriber(ctx, subscription.Key)
if err != nil {
s := fmt.Sprintf("no subscriber for subscription %s", subscription.Key)
logger.Tracef(s)
enqueueTimelineEvent(optional.None[schema.RefKey](), optional.Some(s))
logger.Tracef("no subscriber for subscription %s", subscription.Key)
enqueueTimelineEvent(optional.None[schema.RefKey](), optional.Some(fmt.Sprintf("no subscriber for subscription %s", subscription.Key)))
continue
}

Expand Down
2 changes: 1 addition & 1 deletion backend/controller/timeline/events_pubsub_consume.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ type PubSubConsume struct {
Error optional.Option[string]
}

func (e *PubSubConsume) toEvent() (Event, error) {
func (e *PubSubConsume) toEvent() (Event, error) { //nolint:unparam
return &PubSubConsumeEvent{
PubSubConsume: *e,
Duration: time.Since(e.Time),
Expand Down
2 changes: 1 addition & 1 deletion backend/controller/timeline/events_pubsub_publish.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ type PubSubPublish struct {
Error optional.Option[string]
}

func (e *PubSubPublish) toEvent() (Event, error) {
func (e *PubSubPublish) toEvent() (Event, error) { //nolint:unparam
return &PubSubPublishEvent{
PubSubPublish: *e,
Duration: time.Since(e.Time),
Expand Down

0 comments on commit c1ddc5a

Please sign in to comment.