Skip to content
This repository has been archived by the owner on Dec 17, 2024. It is now read-only.

Commit

Permalink
cosmetics NoCursorTimeout
Browse files Browse the repository at this point in the history
  • Loading branch information
AnatoleAM committed Dec 12, 2023
1 parent 594c669 commit fa0d28c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion data/query/query.cosmetics.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"go.mongodb.org/mongo-driver/bson"
"go.mongodb.org/mongo-driver/bson/primitive"
mongod "go.mongodb.org/mongo-driver/mongo"
"go.mongodb.org/mongo-driver/mongo/options"
)

func (q *Query) Cosmetics(ctx context.Context, ids utils.Set[primitive.ObjectID]) ([]structures.Cosmetic[bson.Raw], error) {
Expand All @@ -31,7 +32,7 @@ func (q *Query) Cosmetics(ctx context.Context, ids utils.Set[primitive.ObjectID]
}

// Query
cur, err = q.mongo.Collection(mongo.CollectionNameCosmetics).Find(ctx, bson.M{})
cur, err = q.mongo.Collection(mongo.CollectionNameCosmetics).Find(ctx, bson.M{}, options.Find().SetNoCursorTimeout(true))
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion terraform/deployment.tf
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ resource "kubernetes_deployment" "app" {
strategy {
type = "RollingUpdate"
rolling_update {
max_surge = "3"
max_surge = "1"
max_unavailable = "3"
}
}
Expand Down

0 comments on commit fa0d28c

Please sign in to comment.