Skip to content

Commit

Permalink
revision 5.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Dhiogo Acioli committed Sep 20, 2022
1 parent f34702f commit 04c8fd1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/VerusDate.Api/Repository/CosmosRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class CosmosRepository : IRepository
public Container Container { get; private set; }

private const double ru_limit_get = 2;
private const double ru_limit_query = 3;
private const double ru_limit_query = 4;
private const double ru_limit_save = 30; //15

public CosmosRepository(IConfiguration config)
Expand Down Expand Up @@ -90,7 +90,7 @@ public async Task<T> Get<T>(QueryDefinition query, string partitionKeyValue, Can
var response = await iterator.ReadNextAsync(cancellationToken);

count += response.RequestCharge;
if (count > ru_limit_get) throw new NotificationException($"RU limit exceeded get ({response.RequestCharge})");
if (count > ru_limit_query) throw new NotificationException($"RU limit exceeded get ({response.RequestCharge})");

return response.Resource.FirstOrDefault();
}
Expand Down

0 comments on commit 04c8fd1

Please sign in to comment.