Skip to content

Commit

Permalink
fix: longer delay between batches
Browse files Browse the repository at this point in the history
  • Loading branch information
crnbarr93 committed Aug 23, 2024
1 parent 6434758 commit 7c1169b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions packages/server/src/queries/osmosis/orderbooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ export const queryOrderbookActiveOrders = createNodeQuery<
options: () => {
return {
credentials: "include",
keepalive: true,
};
},
});
Expand Down
2 changes: 1 addition & 1 deletion packages/trpc/src/orderbook-router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ export const orderbookRouter = createTRPCRouter({
}
const batchOrders = await Promise.all(promises);
allOrders.push(...batchOrders.flat());
await new Promise((resolve) => setTimeout(resolve, 150));
await new Promise((resolve) => setTimeout(resolve, 250));
}
// promises.push(
// getOrderbookHistoricalOrders({
Expand Down
4 changes: 2 additions & 2 deletions packages/web/hooks/limit-orders/use-orderbook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -294,8 +294,8 @@ export const useOrderbookAllActiveOrders = ({
enabled: !!userAddress && addresses.length > 0,
refetchOnMount: true,
keepPreviousData: false,
cacheTime: 30000,
staleTime: 30000,
cacheTime: refetchInterval,
staleTime: refetchInterval,
trpc: {
abortOnUnmount: true,
context: {
Expand Down

0 comments on commit 7c1169b

Please sign in to comment.