Skip to content

Commit

Permalink
increase database ping timeout to 500ms
Browse files Browse the repository at this point in the history
  • Loading branch information
konrad2002 committed Dec 3, 2023
1 parent fc31de8 commit df2fd72
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion service/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func Init(c *mongo.Client) {

func PingDatabase() bool {

ctx, cancel := context.WithTimeout(context.Background(), time.Millisecond*100)
ctx, cancel := context.WithTimeout(context.Background(), time.Millisecond*500)
defer cancel()

err := client.Ping(ctx, readpref.Primary())
Expand Down

0 comments on commit df2fd72

Please sign in to comment.