mirror of
https://github.com/MODSetter/SurfSense
synced 2026-06-21 13:44:09 +00:00
656e061f84
- Introduced a `ProcessingMode` enum to differentiate between basic and premium processing modes. - Updated `EtlRequest` to include a `processing_mode` field, defaulting to basic. - Enhanced ETL pipeline services to utilize the selected processing mode for Azure Document Intelligence and LlamaCloud parsing. - Modified various routes and services to handle processing mode, affecting document upload and indexing tasks. - Improved error handling and logging to include processing mode details. - Added tests to validate processing mode functionality and its impact on ETL operations.
24 lines
608 B
TypeScript
24 lines
608 B
TypeScript
import { MutationCache, QueryCache, QueryClient } from "@tanstack/react-query";
|
|
import { showErrorToast } from "../error-toast";
|
|
|
|
export const queryClient = new QueryClient({
|
|
defaultOptions: {
|
|
queries: {
|
|
staleTime: 30_000,
|
|
refetchOnWindowFocus: false,
|
|
},
|
|
},
|
|
queryCache: new QueryCache({
|
|
onError: (error, query) => {
|
|
if (query.meta?.suppressGlobalErrorToast) return;
|
|
showErrorToast(error);
|
|
},
|
|
}),
|
|
mutationCache: new MutationCache({
|
|
onError: (error, _variables, _context, mutation) => {
|
|
if (mutation.meta?.suppressGlobalErrorToast) return;
|
|
showErrorToast(error);
|
|
},
|
|
}),
|
|
});
|