Skip to content

Reduce circuit lifetime #162

@Lolle2000la

Description

@Lolle2000la

Right now, extensive usage of scoped ApplicationDbContext in the blazor server UI causes circuits to be kept alive for a very long time.

To reduce that, all direct usages in the UI must be replaced with IDbContextFactory-constructed instance usages. All usages by UI-facing services (including those used transitively) must lose that dependency as well, so they should receive the context to use as a method parameter. If an internal usage is absolutely necessary (for example for parallelization), make sure that those instances have their changes saved as well and afterwards the new data gets loaded outside.

You also have to update the tests then to supply that factory to tests that need them. Please supply a proper factory on that point.

The factory itself is already registered in MangaIngestWithUpscaling/Program.cs, so you can just make use of it.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions