Compare commits
1 Commits
main
...
chore/Patc
| Author | SHA1 | Date |
|---|---|---|
|
|
77f5d26225 |
|
|
@ -66,7 +66,7 @@
|
|||
"sqlite3"
|
||||
],
|
||||
"overrides": {
|
||||
"axios": "1.7.9",
|
||||
"axios": "1.10.0",
|
||||
"body-parser": "2.0.2",
|
||||
"braces": "3.0.3",
|
||||
"cross-spawn": "7.0.6",
|
||||
|
|
@ -76,10 +76,14 @@
|
|||
"nth-check": "2.1.1",
|
||||
"path-to-regexp": "0.1.12",
|
||||
"prismjs": "1.29.0",
|
||||
"rollup": "4.45.0",
|
||||
"semver": "7.7.1",
|
||||
"set-value": "4.1.0",
|
||||
"tar-fs": "3.1.0",
|
||||
"unset-value": "2.0.1",
|
||||
"webpack-dev-middleware": "7.4.2"
|
||||
"webpack-dev-middleware": "7.4.2",
|
||||
"ws": "8.18.3",
|
||||
"xlsx": "https://cdn.sheetjs.com/xlsx-0.20.3/xlsx-0.20.3.tgz"
|
||||
}
|
||||
},
|
||||
"engines": {
|
||||
|
|
|
|||
|
|
@ -125,7 +125,7 @@
|
|||
"openai": "^4.96.0",
|
||||
"papaparse": "^5.4.1",
|
||||
"pdf-parse": "^1.1.1",
|
||||
"pdfjs-dist": "^3.7.107",
|
||||
"pdfjs-dist": "^5.3.93",
|
||||
"pg": "^8.11.2",
|
||||
"playwright": "^1.35.0",
|
||||
"puppeteer": "^20.7.1",
|
||||
|
|
@ -148,13 +148,12 @@
|
|||
"@swc/core": "^1.3.99",
|
||||
"@types/crypto-js": "^4.1.1",
|
||||
"@types/gulp": "4.0.9",
|
||||
"@types/lodash": "^4.14.202",
|
||||
"@types/lodash": "^4.17.20",
|
||||
"@types/node-fetch": "2.6.2",
|
||||
"@types/object-hash": "^3.0.2",
|
||||
"@types/papaparse": "^5.3.15",
|
||||
"@types/pg": "^8.10.2",
|
||||
"@types/ws": "^8.5.3",
|
||||
"babel-register": "^6.26.0",
|
||||
"gulp": "^4.0.2",
|
||||
"rimraf": "^5.0.5",
|
||||
"tsc-watch": "^6.0.4",
|
||||
|
|
|
|||
|
|
@ -61,6 +61,8 @@
|
|||
"license": "SEE LICENSE IN LICENSE.md",
|
||||
"dependencies": {
|
||||
"@aws-sdk/client-secrets-manager": "^3.699.0",
|
||||
"@bull-board/api": "^6.11.0",
|
||||
"@bull-board/express": "^6.11.0",
|
||||
"@google-cloud/logging-winston": "^6.0.0",
|
||||
"@keyv/redis": "^4.2.0",
|
||||
"@oclif/core": "4.0.7",
|
||||
|
|
@ -79,7 +81,7 @@
|
|||
"@opentelemetry/sdk-trace-base": "1.27.0",
|
||||
"@opentelemetry/semantic-conventions": "1.27.0",
|
||||
"@types/bcryptjs": "^2.4.6",
|
||||
"@types/lodash": "^4.14.202",
|
||||
"@types/lodash": "^4.17.20",
|
||||
"@types/passport": "^1.0.16",
|
||||
"@types/passport-jwt": "^4.0.1",
|
||||
"@types/passport-local": "^1.0.38",
|
||||
|
|
@ -87,7 +89,6 @@
|
|||
"async-mutex": "^0.4.0",
|
||||
"axios": "1.7.9",
|
||||
"bcryptjs": "^2.4.3",
|
||||
"bull-board": "^2.1.3",
|
||||
"bullmq": "5.45.2",
|
||||
"cache-manager": "^6.3.2",
|
||||
"connect-pg-simple": "^10.0.0",
|
||||
|
|
@ -169,7 +170,7 @@
|
|||
"cypress": "^13.13.0",
|
||||
"jest": "^29.7.0",
|
||||
"nodemon": "^2.0.22",
|
||||
"oclif": "^3",
|
||||
"oclif": "^4.20.5",
|
||||
"rimraf": "^5.0.5",
|
||||
"run-script-os": "^1.1.6",
|
||||
"shx": "^0.3.3",
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ import { Workspace } from './enterprise/database/entities/workspace.entity'
|
|||
import { Organization } from './enterprise/database/entities/organization.entity'
|
||||
import { GeneralRole, Role } from './enterprise/database/entities/role.entity'
|
||||
import { migrateApiKeysFromJsonToDb } from './utils/apiKey'
|
||||
import { ExpressAdapter } from '@bull-board/express'
|
||||
|
||||
declare global {
|
||||
namespace Express {
|
||||
|
|
@ -128,13 +129,16 @@ export class App {
|
|||
// Init Queues
|
||||
if (process.env.MODE === MODE.QUEUE) {
|
||||
this.queueManager = QueueManager.getInstance()
|
||||
const serverAdapter = new ExpressAdapter()
|
||||
serverAdapter.setBasePath('/admin/queues')
|
||||
this.queueManager.setupAllQueues({
|
||||
componentNodes: this.nodesPool.componentNodes,
|
||||
telemetry: this.telemetry,
|
||||
cachePool: this.cachePool,
|
||||
appDataSource: this.AppDataSource,
|
||||
abortControllerPool: this.abortControllerPool,
|
||||
usageCacheManager: this.usageCacheManager
|
||||
usageCacheManager: this.usageCacheManager,
|
||||
serverAdapter
|
||||
})
|
||||
logger.info('✅ [Queue]: All queues setup successfully')
|
||||
|
||||
|
|
|
|||
|
|
@ -7,10 +7,11 @@ import { CachePool } from '../CachePool'
|
|||
import { DataSource } from 'typeorm'
|
||||
import { AbortControllerPool } from '../AbortControllerPool'
|
||||
import { QueueEventsProducer, RedisOptions } from 'bullmq'
|
||||
import { createBullBoard } from 'bull-board'
|
||||
import { BullMQAdapter } from 'bull-board/bullMQAdapter'
|
||||
import { createBullBoard } from '@bull-board/api'
|
||||
import { BullMQAdapter } from '@bull-board/api/bullMQAdapter'
|
||||
import { Express } from 'express'
|
||||
import { UsageCacheManager } from '../UsageCacheManager'
|
||||
import { ExpressAdapter } from '@bull-board/express'
|
||||
|
||||
const QUEUE_NAME = process.env.QUEUE_NAME || 'flowise-queue'
|
||||
|
||||
|
|
@ -98,7 +99,8 @@ export class QueueManager {
|
|||
cachePool,
|
||||
appDataSource,
|
||||
abortControllerPool,
|
||||
usageCacheManager
|
||||
usageCacheManager,
|
||||
serverAdapter
|
||||
}: {
|
||||
componentNodes: IComponentNodes
|
||||
telemetry: Telemetry
|
||||
|
|
@ -106,6 +108,7 @@ export class QueueManager {
|
|||
appDataSource: DataSource
|
||||
abortControllerPool: AbortControllerPool
|
||||
usageCacheManager: UsageCacheManager
|
||||
serverAdapter?: ExpressAdapter
|
||||
}) {
|
||||
const predictionQueueName = `${QUEUE_NAME}-prediction`
|
||||
const predictionQueue = new PredictionQueue(predictionQueueName, this.connection, {
|
||||
|
|
@ -131,7 +134,12 @@ export class QueueManager {
|
|||
})
|
||||
this.registerQueue('upsert', upsertionQueue)
|
||||
|
||||
const bullboard = createBullBoard([new BullMQAdapter(predictionQueue.getQueue()), new BullMQAdapter(upsertionQueue.getQueue())])
|
||||
this.bullBoardRouter = bullboard.router
|
||||
if (serverAdapter) {
|
||||
createBullBoard({
|
||||
queues: [new BullMQAdapter(predictionQueue.getQueue()), new BullMQAdapter(upsertionQueue.getQueue())],
|
||||
serverAdapter: serverAdapter
|
||||
})
|
||||
this.bullBoardRouter = serverAdapter.getRouter()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
77235
pnpm-lock.yaml
77235
pnpm-lock.yaml
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue