Skip to content

Investigate and possibly replace _ReadReplicaRouterStorage #537

Description

@ormsbee

_ReadReplicaRouterStorage is a thread local, and may need to be replaced with a contextvar to make things async-friendly. It's possible that built-in Django functionality now exists to do the same thing, and we can replace this altogether.

class _ReadReplicaRouterStorage(threading.local):
def __init__(self):
super().__init__()
self.db_name = None
_storage = _ReadReplicaRouterStorage()

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