zephyr: Decrease update frequency of sync-public-streams.
This commit is contained in:
parent
70f457f82a
commit
4627b07396
|
@ -60,7 +60,14 @@ if __name__ == "__main__":
|
||||||
zulip_client = zulip.Client(client="ZulipSyncPublicStreamsBot/0.1")
|
zulip_client = zulip.Client(client="ZulipSyncPublicStreamsBot/0.1")
|
||||||
|
|
||||||
while True:
|
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()
|
public_streams = fetch_public_streams()
|
||||||
if public_streams is None:
|
if public_streams is None:
|
||||||
continue
|
continue
|
||||||
|
|
Loading…
Reference in a new issue