mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 13:00:56 +03:00
Feature/Add bullmq redis for message queue processing (#3568)
* add bullmq redis for message queue processing * Update pnpm-lock.yaml * update queue manager * remove singleton patterns, add redis to cache pool * add bull board ui * update rate limit handler * update redis configuration * Merge add rate limit redis prefix * update rate limit queue events * update preview loader to queue * refractor namings to constants * update env variable for queue * update worker shutdown gracefully
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
import { ICommonObject } from 'flowise-components'
|
||||
import { DocumentStore } from './database/entities/DocumentStore'
|
||||
import { DataSource } from 'typeorm'
|
||||
import { IComponentNodes } from './Interface'
|
||||
import { Telemetry } from './utils/telemetry'
|
||||
import { CachePool } from './CachePool'
|
||||
|
||||
export enum DocumentStoreStatus {
|
||||
EMPTY_SYNC = 'EMPTY',
|
||||
@@ -112,6 +116,38 @@ export interface IDocumentStoreWhereUsed {
|
||||
name: string
|
||||
}
|
||||
|
||||
export interface IUpsertQueueAppServer {
|
||||
appDataSource: DataSource
|
||||
componentNodes: IComponentNodes
|
||||
telemetry: Telemetry
|
||||
cachePool?: CachePool
|
||||
}
|
||||
|
||||
export interface IExecuteDocStoreUpsert extends IUpsertQueueAppServer {
|
||||
storeId: string
|
||||
totalItems: IDocumentStoreUpsertData[]
|
||||
files: Express.Multer.File[]
|
||||
isRefreshAPI: boolean
|
||||
}
|
||||
|
||||
export interface IExecutePreviewLoader extends Omit<IUpsertQueueAppServer, 'telemetry'> {
|
||||
data: IDocumentStoreLoaderForPreview
|
||||
isPreviewOnly: boolean
|
||||
telemetry?: Telemetry
|
||||
}
|
||||
|
||||
export interface IExecuteProcessLoader extends IUpsertQueueAppServer {
|
||||
data: IDocumentStoreLoaderForPreview
|
||||
docLoaderId: string
|
||||
isProcessWithoutUpsert: boolean
|
||||
}
|
||||
|
||||
export interface IExecuteVectorStoreInsert extends IUpsertQueueAppServer {
|
||||
data: ICommonObject
|
||||
isStrictSave: boolean
|
||||
isVectorStoreInsert: boolean
|
||||
}
|
||||
|
||||
const getFileName = (fileBase64: string) => {
|
||||
let fileNames = []
|
||||
if (fileBase64.startsWith('FILE-STORAGE::')) {
|
||||
|
||||
Reference in New Issue
Block a user