Project

Profile

Help

Task #8975

closed

Task #8488: [EPIC] Upgrade to django 3.2

Provide environment variables to permit Django ORM to work in an async context

Added by dalley over 3 years ago. Updated over 3 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
Start date:
Due date:
% Done:

100%

Estimated time:
Platform Release:
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Quarter:

Description

We will need to have provide for the worker processes the environment variable DJANGO_ALLOW_ASYNC_UNSAFE

https://docs.djangoproject.com/en/3.1/topics/async/#envvar-DJANGO_ALLOW_ASYNC_UNSAFE

Despite the warnings, we've tried to be careful about our usage of the ORM so that it remains safe within async code (not sharing querysets between coroutines), so it should be safe. In any case, it's just re-enabling what we've been doing for a long time.

At some point when Django introduces proper async ORM support we will definitely want to re-architect to take advantage of that.

Also available in: Atom PDF