Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
赵月辉
/
fastgpt-migrated
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Unverified
Commit
3ea18531
authored
Sep 09, 2024
by
Archer
Committed by
GitHub
Sep 09, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: workflow clear repeat check run (#2646)
parent
a1ae08f6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
6 deletions
+10
-6
packages/service/core/workflow/dispatch/index.ts
+4
-5
projects/app/src/pages/api/common/system/getInitData.ts
+6
-1
No files found.
packages/service/core/workflow/dispatch/index.ts
View file @
3ea18531
...
...
@@ -303,8 +303,8 @@ export async function dispatchWorkFlow(data: Props): Promise<DispatchFlowRespons
};
}
// 每个节点
运行/跳过 后
,初始化边的状态
function
nodeRun
After
Hook
(
node
:
RuntimeNodeItemType
)
{
// 每个节点
确定 运行/跳过 前
,初始化边的状态
function
nodeRun
Before
Hook
(
node
:
RuntimeNodeItemType
)
{
node
.
isEntry
=
false
;
runtimeEdges
.
forEach
((
item
)
=>
{
...
...
@@ -331,11 +331,13 @@ export async function dispatchWorkFlow(data: Props): Promise<DispatchFlowRespons
});
const
nodeRunResult
=
await
(()
=>
{
if
(
status
===
'run'
)
{
nodeRunBeforeHook
(
node
);
props
.
maxRunTimes
--
;
addLog
.
debug
(
`[dispatchWorkFlow] nodeRunWithActive:
${
node
.
name
}
`
);
return
nodeRunWithActive
(
node
);
}
if
(
status
===
'skip'
&&
!
skippedNodeIdList
.
has
(
node
.
nodeId
))
{
nodeRunBeforeHook
(
node
);
props
.
maxRunTimes
-=
0.1
;
skippedNodeIdList
.
add
(
node
.
nodeId
);
addLog
.
debug
(
`[dispatchWorkFlow] nodeRunWithSkip:
${
node
.
name
}
`
);
...
...
@@ -502,8 +504,6 @@ export async function dispatchWorkFlow(data: Props): Promise<DispatchFlowRespons
dispatchRes
[
item
.
key
]
=
valueTypeFormat
(
item
.
defaultValue
,
item
.
valueType
);
});
nodeRunAfterHook
(
node
);
return
{
node
,
runStatus
:
'run'
,
...
...
@@ -520,7 +520,6 @@ export async function dispatchWorkFlow(data: Props): Promise<DispatchFlowRespons
}
>
{
// Set target edges status to skipped
const
targetEdges
=
runtimeEdges
.
filter
((
item
)
=>
item
.
source
===
node
.
nodeId
);
nodeRunAfterHook
(
node
);
return
{
node
,
...
...
projects/app/src/pages/api/common/system/getInitData.ts
View file @
3ea18531
...
...
@@ -10,7 +10,12 @@ async function handler(req: NextApiRequest, res: NextApiResponse) {
data
:
{
feConfigs
:
global
.
feConfigs
,
subPlans
:
global
.
subPlans
,
llmModels
:
global
.
llmModels
,
llmModels
:
global
.
llmModels
.
map
((
model
)
=>
({
...
model
,
customCQPrompt
:
''
,
customExtractPrompt
:
''
,
defaultSystemChatPrompt
:
''
})),
vectorModels
:
global
.
vectorModels
,
reRankModels
:
global
.
reRankModels
?.
map
((
item
)
=>
({
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment