Skip to content

Commit

Permalink
Better recovery from a bad cache state; (#297)
Browse files Browse the repository at this point in the history
  • Loading branch information
stef-coenen authored Sep 25, 2024
1 parent 733fe3c commit f91adfd
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 3 deletions.
1 change: 0 additions & 1 deletion packages/chat-app/src/hooks/chat/useChatMessages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ export const useChatMessages = (props?: { conversationId: string | undefined })
: undefined,
enabled: !!conversationId,
refetchOnMount: false,
refetchOnReconnect: false,
staleTime: 1000 * 60 * 60 * 24, // 24 hour
}),
markAsRead: useMutation({
Expand Down
2 changes: 1 addition & 1 deletion packages/chat-app/src/hooks/chat/useLiveChatProcessor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ const useInboxProcessor = (connected?: boolean) => {

const fetchData = async () => {
const lastProcessedTime = queryClient.getQueryState(['process-inbox'])?.dataUpdatedAt;
const lastProcessedWithBuffer = lastProcessedTime && lastProcessedTime - MINUTE_IN_MS * 2;
const lastProcessedWithBuffer = lastProcessedTime && lastProcessedTime - MINUTE_IN_MS * 5;

const processedresult = await processInbox(dotYouClient, ChatDrive, BATCH_SIZE);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ export const getCommunityMessagesInfiniteQueryOptions: (
: undefined,
enabled: !!communityId,
refetchOnMount: true,
refetchOnReconnect: false,
staleTime: 1000 * 60 * 60 * 24, // 24 hour
});

Expand Down

0 comments on commit f91adfd

Please sign in to comment.