Skip to content

Don't run queries run in app.ready() - GeneCountType #1402

@davmlaw

Description

@davmlaw

You sometimes (because of cache, we only check once a day) get this message on startup:

$ python3 manage.py shell
/home/dlawrence/localwork/variantgrid/.venv/lib/python3.12/site-packages/django/db/backends/utils.py:98: RuntimeWarning: Accessing the database during app initialization is discouraged. To fix this warning, avoid executing queries in AppConfig.ready() or when your app modules are imported.
  warnings.warn(self.APPS_NOT_READY_WARNING_MSG, category=RuntimeWarning)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions