Michał Szczepańczyk

Results 7 comments of Michał Szczepańczyk

Another option is to use django cursors to execute [custom sql directly](https://docs.djangoproject.com/en/3.2/topics/db/sql/#executing-custom-sql-directly) (like in this PR at the moment). Pro: no additional work to create models. I think the best...

Maybe I don't fully understand what you meant in 1st approach. Psycopg2 can't be used by workers. Aiopg can be used with workers, but it is not using django connection,...

I think it still wouldn't work, because Psycopg2Connector creates separate connections and django.db.connection must be used to make transactions work correctly.

Yes, I would like to participate. I've already created DjangoConnector based on Psycopg2Connetor, but it is working only in django app. I have to investigate how to make it work...

I've created some draft which we can discuss

Summary of my findings so far: 1. To be able to defer task and use Django ORM in one transaction the same connection must be used, so `django.db.connections` must be...

Even if `dotenv` were available, it would still have a few issues: 1. It would require generating a dotenv file and removing it after task execution, which could cause issues...