diff options
| author | Adam Soltys <[email protected]> | 2022-12-29 16:07:13 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2022-12-29 16:07:13 -0800 |
| commit | 0f20d1cb0ca5a65ff6ae5fc4bb97657fc7ba4ee5 (patch) | |
| tree | 4292426bcf7337e6f2b22f1dc4113e7a3f32716c /lib/utils.js | |
| parent | 33bfa7d2d4d74f4724d117ad58a825253e53d321 (diff) | |
| download | coinos-server-0f20d1cb0ca5a65ff6ae5fc4bb97657fc7ba4ee5.tar.gz coinos-server-0f20d1cb0ca5a65ff6ae5fc4bb97657fc7ba4ee5.zip | |
follower query caching
Diffstat (limited to 'lib/utils.js')
| -rw-r--r-- | lib/utils.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/utils.js b/lib/utils.js index 08a582eb..0d2d3efb 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -13,7 +13,7 @@ import { coinos } from "$lib/nostr"; const { Op } = sequelize; export const sleep = n => new Promise(r => setTimeout(r, n)); -export const wait = async (f, s = 300, n = 1000) => { +export const wait = async (f, s = 300, n = 50) => { let i = 0; while (!(await f()) && i < s) (await sleep(n)) && i++; if (i >= s) throw new Error("timeout"); |
