Django channels

2020-09-22 Thread zidan....@gmail.com
Hi there . its my first time to post on this comunity and i'm very happy to to do that. I'm using djnago channels `AsyncWebsocketConsumer` consumer . pay attention to `receive` method in my code .in i cant understand why this code block `await self.channel_layer.group_send` called after this

Trouble with Select_for_update. Postgresql

2021-03-29 Thread zidan....@gmail.com
Hi there . code is as follows: ` models.Classroom table have just one record. # THREAD 1 school_classrooms = models.Classroom.objects.select_for_update().all() with transaction.atomic(): list(school_classrooms) time.sleep(10) # THREAD 2 classroom = models.Classroom.objects.first() classroom.name =