Set a loop_sleep_time for sync_forever()
https://github.com/poljar/matrix-nio/pull/132#pullrequestreview-412701098 "If not [set] the client will sync without any sleep between syncs. This will cause a lot of load on the homeserver and the client."
This commit is contained in:
parent
084133af49
commit
ddf7e724fd
|
@ -333,6 +333,7 @@ class MatrixClient(nio.AsyncClient):
|
||||||
try:
|
try:
|
||||||
self.sync_task = asyncio.ensure_future(self.sync_forever(
|
self.sync_task = asyncio.ensure_future(self.sync_forever(
|
||||||
timeout = 10_000,
|
timeout = 10_000,
|
||||||
|
loop_sleep_time = 1000,
|
||||||
sync_filter = self.lazy_load_filter,
|
sync_filter = self.lazy_load_filter,
|
||||||
first_sync_filter = filter1,
|
first_sync_filter = filter1,
|
||||||
))
|
))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user