Await the send notifications coroutines
Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
This commit is contained in:
parent
ca7cf5987c
commit
31f5373652
|
@ -509,7 +509,7 @@ class DrawConsumer(AsyncJsonWebsocketConsumer):
|
|||
{'type': 'draw.box_visibility', 'visible': True})
|
||||
|
||||
# Notify the team that it can draw a problem
|
||||
self.channel_layer.group_send(f"team-{tds[0].participation.team.trigram}",
|
||||
await self.channel_layer.group_send(f"team-{tds[0].participation.team.trigram}",
|
||||
{'type': 'draw.notify', 'title': "À votre tour !",
|
||||
'body': "C'est à vous de tirer un nouveau problème !"})
|
||||
|
||||
|
@ -631,7 +631,7 @@ class DrawConsumer(AsyncJsonWebsocketConsumer):
|
|||
{'type': 'draw.box_visibility', 'visible': True})
|
||||
|
||||
# Notify the team that it can draw a problem
|
||||
self.channel_layer.group_send(f"team-{new_trigram}",
|
||||
await self.channel_layer.group_send(f"team-{new_trigram}",
|
||||
{'type': 'draw.notify', 'title': "À votre tour !",
|
||||
'body': "C'est à vous de tirer un nouveau problème !"})
|
||||
else:
|
||||
|
@ -684,7 +684,7 @@ class DrawConsumer(AsyncJsonWebsocketConsumer):
|
|||
await self.channel_layer.group_send(f"team-{td.participation.team.trigram}",
|
||||
{'type': 'draw.dice_visibility', 'visible': True})
|
||||
# Notify the team that it can draw a dice
|
||||
self.channel_layer.group_send(f"team-{td.participation.team.trigram}",
|
||||
await self.channel_layer.group_send(f"team-{td.participation.team.trigram}",
|
||||
{'type': 'draw.notify', 'title': "À votre tour !",
|
||||
'body': "C'est à vous de lancer le dé !"})
|
||||
|
||||
|
@ -706,7 +706,7 @@ class DrawConsumer(AsyncJsonWebsocketConsumer):
|
|||
{'type': 'draw.dice', 'team': participation.team.trigram, 'result': None})
|
||||
|
||||
# Notify the team that it can draw a dice
|
||||
self.channel_layer.group_send(f"team-{participation.team.trigram}",
|
||||
await self.channel_layer.group_send(f"team-{participation.team.trigram}",
|
||||
{'type': 'draw.notify', 'title': "À votre tour !",
|
||||
'body': "C'est à vous de lancer le dé !"})
|
||||
|
||||
|
@ -818,7 +818,7 @@ class DrawConsumer(AsyncJsonWebsocketConsumer):
|
|||
{'type': 'draw.set_active', 'draw': self.tournament.draw})
|
||||
|
||||
# Notify the team that it can draw a problem
|
||||
self.channel_layer.group_send(f"team-{new_trigram}",
|
||||
await self.channel_layer.group_send(f"team-{new_trigram}",
|
||||
{'type': 'draw.notify', 'title': "À votre tour !",
|
||||
'body': "C'est à vous de tirer un nouveau problème !"})
|
||||
|
||||
|
@ -896,7 +896,7 @@ class DrawConsumer(AsyncJsonWebsocketConsumer):
|
|||
{'type': 'draw.dice_visibility', 'visible': True})
|
||||
|
||||
# Notify the team that it can draw a problem
|
||||
self.channel_layer.group_send(f"team-{td.participation.team.trigram}",
|
||||
await self.channel_layer.group_send(f"team-{td.participation.team.trigram}",
|
||||
{'type': 'draw.notify', 'title': "À votre tour !",
|
||||
'body': "C'est à vous de tirer un nouveau problème !"})
|
||||
|
||||
|
|
Loading…
Reference in New Issue