Queenferno

Results comments of Queenferno

Yes I'm using the same Policy throughout my project. And it's missbehaving. If a set mps = 10, the RateLimiter takes 5 messages per second (and not 10, as expected)...

I wrote a Console Application. My code is as follows: ```csharp using Polly; var policy = GetPolicy(2); for (var i = 0; i < 10000; i++) { await policy.ExecuteAsync(() =>...

If I change the code to: ` return Policy .HandleResult(result => { return result.StatusCode == System.Net.HttpStatusCode.TooManyRequests; }) .Or() .WaitAndRetryForeverAsync((retryNum, context) => { Console.WriteLine($"Retrying. Num: {retryNum}"); return TimeSpan.FromSeconds(2); }).WrapAsync( Policy.RateLimitAsync(mps, TimeSpan.FromSeconds(1)));...

I wrote it wrong. I changed it to ` .WaitAndRetryForeverAsync((retryNum, context) => { Console.WriteLine($"Retrying. Num: {retryNum}"); return TimeSpan.FromSeconds(1.0 / mps ); }) ` and my `GetPolicy(2)` writes once (1) every...

*edit (for some reason i cannot edit my initial issue) --> The Policy.RateLimitAsync must return a IAsyncPolicy and I'm returning an IAsyncPolicy-TimeSpan

Can you post a code-example? I don't know how to do that. (THanx for your reply)

Thank you! I applied the second snippet and it worked like a charm!

I agree as well and that is something I was trying to accomplish, namely: - Hide the Legend from the Original chart - Use the `legendCallback` to display the Legend...