Skip to content

Commit

Permalink
Use initialize_container in django integration
Browse files Browse the repository at this point in the history
  • Loading branch information
maldoinc committed May 26, 2024
1 parent 546207b commit 38420ab
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions wireup/integration/django/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from django.apps import AppConfig
from django.conf import settings

from wireup import container, warmup_container
from wireup import container, initialize_container

if TYPE_CHECKING:
from wireup.integration.django import WireupSettings
Expand All @@ -24,7 +24,9 @@ def ready(self) -> None: # noqa: D102
if not entry.startswith("__") and hasattr(settings, entry):
container.params.put(entry, getattr(settings, entry))

warmup_container(
initialize_container(
container,
[importlib.import_module(m) if isinstance(m, str) else m for m in integration_settings.service_modules],
service_modules=[
importlib.import_module(m) if isinstance(m, str) else m for m in integration_settings.service_modules
],
)

0 comments on commit 38420ab

Please sign in to comment.