-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b0e49b3
commit 8af868d
Showing
2 changed files
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8af868d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding SignumInitializeFilterAttribute
This small commit fixes an issue since .Net Core migration: If an application crashes on startup the next request won't try to start it again.
Here are some open issues about this, but doesn't look like there will be an alternative where you can use
InProcess
, get the exception message printed and still get retry functionality as it was possible before .Net Core.dotnet/aspnetcore#9202
https://stackoverflow.com/questions/62169080/asp-net-core-3-1-inprocess-hosted-app-not-restarting-after-exception-on-startup
This is not a pressing issue for people using EntityFramework, because there the schema/context is created the first time access the database.
But in Sigunm Framework the starter needs to be called manually before you make any database access, and if the database is not available or is not a perfect match (not synchronized yet) you get an exception and you need to manually restart the application... till now.
With this change, all the request try to execute an Initialization lambda if not executed yet (or there was an exception). In the Starter, you need to delay all the code that requires a database access to this lambda... and that's it.
Check this commit to see how to migrate: signumsoftware/southwind@9e76bdc
Also take into account that maybe you need to stop using SqlServerVersionDetector.Detect / PostgresVersionDetector.Detect in the web application because it requires a database access.
Cheers!
8af868d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perfect!