Skip to content

Commit a08f521

Browse files
committed
allow multiple live meetings
1 parent 9d3556b commit a08f521

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

host_key_rotation.py

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -78,17 +78,18 @@ def rotate_meetings():
7878
or live[0]["start_time"] < now - datetime.timedelta(minutes=90)
7979
)
8080
):
81-
live_id = live[0]["id"]
82-
common.zoom_request(
83-
requests.put,
84-
f"{common.ZOOM_API}meetings/{live_id}/status",
85-
data=json.dumps({"action": "end"}),
86-
)
87-
common.zoom_request(
88-
requests.patch,
89-
f"{common.ZOOM_API}meetings/{live_id}",
90-
data=json.dumps({"settings": {"join_before_host": False}}),
91-
)
81+
for live_meeting in live:
82+
live_id = live_meeting["id"]
83+
common.zoom_request(
84+
requests.put,
85+
f"{common.ZOOM_API}meetings/{live_id}/status",
86+
data=json.dumps({"action": "end"}),
87+
)
88+
common.zoom_request(
89+
requests.patch,
90+
f"{common.ZOOM_API}meetings/{live_id}",
91+
data=json.dumps({"settings": {"join_before_host": False}}),
92+
)
9293

9394
for meeting in recent:
9495
common.zoom_request(

0 commit comments

Comments
 (0)