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