Skip to content

Commit

Permalink
Merge pull request #415 from forta-protocol/longer-service-start-delay
Browse files Browse the repository at this point in the history
Allow longer service start delay
  • Loading branch information
canercidam authored Feb 9, 2022
2 parents c1faf2d + 6794b14 commit c314c27
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion services/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ import (
"github.com/forta-protocol/forta-node/config"
)

const (
defaultServiceStartDelay = time.Minute * 10
)

// Service is a service abstraction.
type Service interface {
Start() error
Expand Down Expand Up @@ -131,7 +135,7 @@ func StartServices(ctx context.Context, cancelMainCtx context.CancelFunc, logger
}()

select {
case <-time.After(time.Minute):
case <-time.After(defaultServiceStartDelay):
logger.Error("took too long to start service")
cancelMainCtx()
break
Expand Down

0 comments on commit c314c27

Please sign in to comment.