mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2024-12-25 17:42:24 +00:00
Add notification when the draw of the final is resumed
Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
This commit is contained in:
parent
6b962a74b3
commit
feee5069b1
@ -969,6 +969,12 @@ class DrawConsumer(AsyncJsonWebsocketConsumer):
|
|||||||
self.tournament.draw.last_message = msg
|
self.tournament.draw.last_message = msg
|
||||||
await self.tournament.draw.asave()
|
await self.tournament.draw.asave()
|
||||||
|
|
||||||
|
# Send notification to everyone
|
||||||
|
await self.channel_layer.group_send(f"tournament-{self.tournament.id}",
|
||||||
|
{'tid': self.tournament_id, 'type': 'draw.notify',
|
||||||
|
'title': 'Tirage au sort du TFJM²',
|
||||||
|
'body': "Le tirage au sort pour le second tour de la finale a commencé !"})
|
||||||
|
|
||||||
# Set the first pool of the second round as the active pool
|
# Set the first pool of the second round as the active pool
|
||||||
pool = await Pool.objects.filter(round=self.tournament.draw.current_round, letter=1).aget()
|
pool = await Pool.objects.filter(round=self.tournament.draw.current_round, letter=1).aget()
|
||||||
r2.current_pool = pool
|
r2.current_pool = pool
|
||||||
|
Loading…
Reference in New Issue
Block a user