浏览代码

Err, you cannot sleep for negative seconds...

Will Hunt 3 年之前
父节点
当前提交
ebe76e884b
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      mautrix_signal/__main__.py

+ 1 - 1
mautrix_signal/__main__.py

@@ -95,7 +95,7 @@ class SignalBridge(Bridge):
             log.info("Executing periodic syncs")
             log.info("Executing periodic syncs")
             for user in User.by_username.values():
             for user in User.by_username.values():
                 # Add some randomness to the sync to avoid a thundering herd
                 # Add some randomness to the sync to avoid a thundering herd
-                await asyncio.sleep(uniform(-SYNC_JITTER, SYNC_JITTER))
+                await asyncio.sleep(uniform(0, SYNC_JITTER))
                 try:
                 try:
                     await user.sync()
                     await user.sync()
                 except asyncio.CancelledError:
                 except asyncio.CancelledError: