Skip to content

Instantly share code, notes, and snippets.

@adrianiftode
Last active November 13, 2020 20:23
Show Gist options
  • Save adrianiftode/2df2b9208125784775eb40302f42ac99 to your computer and use it in GitHub Desktop.
Save adrianiftode/2df2b9208125784775eb40302f42ac99 to your computer and use it in GitHub Desktop.
public void ConfigureServices(IServiceCollection services)
{
services.AddHealthChecks()
// Check on Redis only when the environment is other than development
.AddRedis(Configuration["Redis:ConnectionString"])
.CheckOnlyWhen(Registrations.Redis, !Environment.IsDevelopment());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment