Skip to content

Commit

Permalink
fix timeout (#175)
Browse files Browse the repository at this point in the history
  • Loading branch information
gusin13 authored Dec 6, 2024
1 parent d909e2b commit 040e3b5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions internal/shared/db/model/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ var collections = map[string][]index{
V1BtcInfoCollection: {{Indexes: map[string]int{}}},
// V2
V2StatsLockCollection: {{Indexes: map[string]int{}}},
V2StakerStatsCollection: {{Indexes: map[string]int{}}},
V2FinalityProviderStatsCollection: {{Indexes: map[string]int{"active_tvl": -1}, Unique: false}},
V2OverallStatsCollection: {{Indexes: map[string]int{}}},
V2FinalityProviderStatsCollection: {{Indexes: map[string]int{"active_tvl": -1}, Unique: false}},
V2StakerStatsCollection: {{Indexes: map[string]int{"active_tvl": -1}, Unique: false}},
}

func Setup(ctx context.Context, cfg *config.Config) error {
Expand Down
2 changes: 1 addition & 1 deletion internal/v2/queue/handler/stats.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func (h *V2QueueHandler) ActiveStakingHandler(ctx context.Context, messageBody s
// Mark as v1 delegation as transitioned if it exists
if err := h.Services.V2Service.MarkV1DelegationAsTransitioned(ctx, activeStakingEvent.StakingTxHashHex); err != nil {
log.Ctx(ctx).Error().Err(err).Msg("Failed to mark v1 delegation as transitioned")
return err
return types.NewError(http.StatusInternalServerError, types.InternalServiceError, err)
}

// TODO: Perform the address lookup conversion
Expand Down
2 changes: 1 addition & 1 deletion internal/v2/queue/queue.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func New(cfg *queueConfig.QueueConfig, service *services.Services) *Queues {
handlers := v2queuehandler.NewV2QueueHandler(service)
return &Queues{
Handlers: handlers,
processingTimeout: time.Duration(cfg.QueueProcessingTimeout) * time.Second,
processingTimeout: cfg.QueueProcessingTimeout,
maxRetryAttempts: cfg.MsgMaxRetryAttempts,
ActiveStakingQueueClient: activeStakingQueueClient,
UnbondingStakingQueueClient: unbondingStakingQueueClient,
Expand Down

0 comments on commit 040e3b5

Please sign in to comment.