You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that you shut down the engine in main. This approach is suitable for disposable apps (such as CLI), for Web Server application you should shut it down in the logic that confirms your web server exits.
Or you don't need to shut down the database query engine (it just has a certain probability that the child process will not be shut down after the Dart process exits unexpectedly. This has no impact on the official deployment, it only occurs when the system is frequently shut down and started during development.)
Warning
For Web Server, we should not shut down the query engine immediately after starting it. The correct approach is to ignore it or shut down the query engine in the logic that ensures the main process exits (however, Dart currently does not have a hook to ensure the main program exits)
https://github.com/necodeIT/license_server/blob/688e162bae36dc35ee96bd0200118aab05221143/bin/main.dart#L54-L56
ref: medz/dart-orm#437
Warning
For Web Server, we should not shut down the query engine immediately after starting it. The correct approach is to ignore it or shut down the query engine in the logic that ensures the main process exits (however, Dart currently does not have a hook to ensure the main program exits)