MCPcopy
hub / github.com/FlowiseAI/Flowise / processLoader

Function processLoader

packages/server/src/services/documentstore/index.ts:845–877  ·  view source on GitHub ↗
({
    appDataSource,
    componentNodes,
    data,
    docLoaderId,
    orgId,
    workspaceId,
    subscriptionId,
    usageCacheManager
}: IExecuteProcessLoader)

Source from the content-addressed store, hash-verified

843}
844
845export const processLoader = async ({
846 appDataSource,
847 componentNodes,
848 data,
849 docLoaderId,
850 orgId,
851 workspaceId,
852 subscriptionId,
853 usageCacheManager
854}: IExecuteProcessLoader) => {
855 const entity = await appDataSource.getRepository(DocumentStore).findOneBy({
856 id: data.storeId,
857 workspaceId: workspaceId
858 })
859 if (!entity) {
860 throw new InternalFlowiseError(
861 StatusCodes.NOT_FOUND,
862 `Error: documentStoreServices.processLoader - Document store ${data.storeId} not found`
863 )
864 }
865 await _saveChunksToStorage(
866 appDataSource,
867 componentNodes,
868 data,
869 entity,
870 docLoaderId,
871 orgId,
872 workspaceId,
873 subscriptionId,
874 usageCacheManager
875 )
876 return getDocumentStoreFileChunks(appDataSource, data.storeId as string, docLoaderId, workspaceId)
877}
878
879const processLoaderMiddleware = async (
880 data: IDocumentStoreLoaderForPreview,

Callers 3

processJobMethod · 0.90
processLoaderMiddlewareFunction · 0.70
upsertDocStoreFunction · 0.70

Calls 2

_saveChunksToStorageFunction · 0.85

Tested by

no test coverage detected