zephyr: Decrease update frequency of sync-public-streams.
@@ -60,7 +60,14 @@ if __name__ == "__main__":
zulip_client = zulip.Client(client="ZulipSyncPublicStreamsBot/0.1")
while True:
- time.sleep(15)
+ # Sync every 5 minutes because this makes a very large network
+ # request, due to Zephyr users who subscribe to 10K+ class
+ # names generated by a script.
+ #
+ # This delay means we won't subscribe to new Zephyr classes
+ # until 5 minutes after they are created in Zulip; this isn't
+ # great but an acceptable tradeoff.
+ time.sleep(300)
public_streams = fetch_public_streams()
if public_streams is None:
continue
