@@ -80,7 +80,9 @@ async def background_task(index):
80
80
while True :
81
81
try :
82
82
# receive message from session
83
- recv_session , msg_rcv = await participant .receive (session = session_info .id )
83
+ recv_session , msg_rcv = await participant .receive (
84
+ session = session_info .id
85
+ )
84
86
85
87
# increase the count
86
88
local_count += 1
@@ -103,9 +105,7 @@ async def background_task(index):
103
105
# reply to the session and call out the next participant
104
106
next_participant = (index + 1 ) % participants_count
105
107
next_participant_name = f"participant-{ next_participant } "
106
- print (
107
- f"{ name } -> Calling out { next_participant_name } ..."
108
- )
108
+ print (f"{ name } -> Calling out { next_participant_name } ..." )
109
109
await participant .publish (
110
110
recv_session ,
111
111
f"{ message } - { next_participant_name } " .encode (),
@@ -114,7 +114,9 @@ async def background_task(index):
114
114
chat ,
115
115
)
116
116
else :
117
- print (f"{ name } -> Receving message: { msg_rcv .decode ()} - not for me. Local count: { local_count } " )
117
+ print (
118
+ f"{ name } -> Receving message: { msg_rcv .decode ()} - not for me. Local count: { local_count } "
119
+ )
118
120
119
121
# If we received as many messages as the number of participants, we can exit
120
122
if local_count >= (participants_count - 1 ):
@@ -134,4 +136,3 @@ async def background_task(index):
134
136
# Wait for the task to complete
135
137
for task in participants :
136
138
await task
137
-
0 commit comments