4x prod server for now, drop some perf restrictions

This commit is contained in:
Collin M. Barrett 2018-09-26 17:53:28 -05:00
parent 0156ea23ff
commit 30c8af5804
2 changed files with 2 additions and 3 deletions

View file

@ -10,10 +10,10 @@ namespace FilterLists.Api.V1.Controllers
[ApiVersion("1.0")]
//TODO: use versioning without needing to manually specify in swagger-ui (https://github.com/domaindrivendev/Swashbuckle.AspNetCore/issues/370)
[Route("v{version:apiVersion}/[controller]")]
[ResponseCache(Duration = 14400)]
[ResponseCache(Duration = 3600)]
public abstract class BaseController : Controller
{
private static readonly TimeSpan MemoryCacheExpirationDefault = TimeSpan.FromHours(4);
private static readonly TimeSpan MemoryCacheExpirationDefault = TimeSpan.FromHours(1);
protected readonly SeedService SeedService;
private readonly IMemoryCache memoryCache;

View file

@ -54,7 +54,6 @@ FROM snapshots_rules
private async Task<IEnumerable<FilterListViewUrlDto>> GetListsToCapture(int batchSize) =>
await DbContext
.FilterLists
.Where(l => l.Id != 526) //~2 million rules, too big for SnapshotService currently
.OrderBy(l => l.Snapshots.Any())
.ThenByDescending(ifLastSnapFailed)
.ThenBy(lastSnapTimestamp)