Skip to content

Commit 4627b07

Browse files
committed
zephyr: Decrease update frequency of sync-public-streams.
1 parent 70f457f commit 4627b07

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

zulip/integrations/zephyr/sync-public-streams

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,14 @@ if __name__ == "__main__":
6060
zulip_client = zulip.Client(client="ZulipSyncPublicStreamsBot/0.1")
6161

6262
while True:
63-
time.sleep(15)
63+
# Sync every 5 minutes because this makes a very large network
64+
# request, due to Zephyr users who subscribe to 10K+ class
65+
# names generated by a script.
66+
#
67+
# This delay means we won't subscribe to new Zephyr classes
68+
# until 5 minutes after they are created in Zulip; this isn't
69+
# great but an acceptable tradeoff.
70+
time.sleep(300)
6471
public_streams = fetch_public_streams()
6572
if public_streams is None:
6673
continue

0 commit comments

Comments
 (0)