Using Throttling


So I must be missing something because all of your documentation is pretty awesome. However, I am confused about how to use throttling. I want to limit a specific method so that only a limited number are ever queued within a window. However…

The examples that show throttling include an example like the one below, but do not answer where this code should be put. Should it be tied to where I configure hangfire? How does hangfire know this manager exists? What manages the lifetime of the Throttling Manager.

Is there a more code-complete example instead of just snippets of code.

IThrottlingManager manager = new ThrottlingManager();
manager.AddOrUpdateFixedWindow(“github”, new FixedWindowOptions(5000, TimeSpan.FromHours(1)));