Bogdanp / django_dramatiq

A Django app that integrates with Dramatiq.
https://dramatiq.io
Other
331 stars 77 forks source link

Replace `AppConfig.ready` workaround with `__init__` #137

Closed amureki closed 1 year ago

amureki commented 1 year ago

Attempt to simplify and not break dramatiq configuration logic. Because AppConfig.ready is being called rather late, we added workaround to call ready() earlier during model import. However, this adds complexity and can bring unexpected implications if someone is overwriting apps.DjangoDramatiqConfig.

amureki commented 1 year ago

@Bogdanp may I ask you to check this one as well? Idea born during the investigation of #133. I wonder if this was ever a solution before. It is a bit different from DjangoDramatiqConfig.initialize() which we got rid of...