I am chasing a database deadlock issue in my application. What appears to
be happening is my SyncConsumers are eating up all the ASGI threads because
they are hung and websocket connections start failing.
Is there a way to add a uWSGI "harakiri" like functionality to
SyncConsumers to defend agains
If you felt the problem was vs code, I have a suggestion. Try it out and if
it works, get back to me.
Open your comman prompt terminal and input
Python -m venv venv (press enter)
Venv/static/activate (press enter)
Then install django again
On Fri, Apr 28, 2023, 3:27 AM Michael Starr
wrote:
> Tha
This Django ORM statement:
Model.objects.all() \
.annotate( ord=Window(
expression=RowNumber(),
partition_by=F('related_id'),
order_by=[F("date_created").desc()]
) \
.filter(ord=1) \
.filter(date_created__lte=some_datetime)
Leads to the following SQL query:
SELECT *
FROM
I found a way to achieve the results I want: applying a filter, `
date_created__lte` in this example, outside of annotated query:
sub = Model.objects.all() \
.annotate(ord=Window(
expression=RowNumber(),
partition_by=F('related_id'),
order_by=[F('date_created').desc()] ) ) \
.fil
This is a wild suggestion, but as someone here mentioned, your vscode might
be pointing to the wrong interpreter.
Check at the bottom bar of your vscode with a .py file open. Next to
{}python you should see what environment you are using.
eg. 3.11.3 64-bit or 3.11.3('.venv':venv)
The latter is w
5 matches
Mail list logo