Open
Description
Hello.
As the title suggests, what should I do with the definition of providers.Singleton that instantiates at the same time as fastapi starts!
I want to generate the following "manager" at the start of fastapi.
(Dependency injection of application_service in manager may be implemented incorrectly.)
class Container(containers.DeclarativeContainer):
application_service = providers.Factory(
ApplicationService,
)
manager = providers.Singleton(
Manager,
application_service=application_service(), # Inject the above application_service dependency.
)
Do you have any good ideas?