mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-29 05:01:10 +03:00
fix: remove useless query
This commit is contained in:
@@ -432,7 +432,7 @@ export class App {
|
|||||||
* @param {IncomingInput} incomingInput
|
* @param {IncomingInput} incomingInput
|
||||||
* @param {INodeData} endingNodeData
|
* @param {INodeData} endingNodeData
|
||||||
*/
|
*/
|
||||||
async startChildProcess(chatflow: ChatFlow, incomingInput: IncomingInput, endingNodeData?: INodeData) {
|
async startChildProcess(chatflow: ChatFlow, chatId: string, incomingInput: IncomingInput, endingNodeData?: INodeData) {
|
||||||
try {
|
try {
|
||||||
const controller = new AbortController()
|
const controller = new AbortController()
|
||||||
const { signal } = controller
|
const { signal } = controller
|
||||||
@@ -441,7 +441,6 @@ export class App {
|
|||||||
if (!fs.existsSync(childpath)) childpath = 'ChildProcess.ts'
|
if (!fs.existsSync(childpath)) childpath = 'ChildProcess.ts'
|
||||||
|
|
||||||
const childProcess = fork(childpath, [], { signal })
|
const childProcess = fork(childpath, [], { signal })
|
||||||
const chatId = await getChatId(chatflow.id)
|
|
||||||
|
|
||||||
const value = {
|
const value = {
|
||||||
chatflow,
|
chatflow,
|
||||||
@@ -562,7 +561,7 @@ export class App {
|
|||||||
if (isRebuildNeeded()) {
|
if (isRebuildNeeded()) {
|
||||||
nodeToExecuteData = this.chatflowPool.activeChatflows[chatflowid].endingNodeData
|
nodeToExecuteData = this.chatflowPool.activeChatflows[chatflowid].endingNodeData
|
||||||
try {
|
try {
|
||||||
const result = await this.startChildProcess(chatflow, incomingInput, nodeToExecuteData)
|
const result = await this.startChildProcess(chatflow, chatId, incomingInput, nodeToExecuteData)
|
||||||
|
|
||||||
return res.json(result)
|
return res.json(result)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@@ -570,7 +569,7 @@ export class App {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
const result = await this.startChildProcess(chatflow, incomingInput)
|
const result = await this.startChildProcess(chatflow, chatId, incomingInput)
|
||||||
return res.json(result)
|
return res.json(result)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
return res.status(500).send(error)
|
return res.status(500).send(error)
|
||||||
|
|||||||
Reference in New Issue
Block a user