fix: workflow tool closes stream writer correctly (#1839)

This commit is contained in:
shentongmartin
2025-08-27 16:29:42 +08:00
committed by GitHub
parent 263a75b1c0
commit 5562800958
19 changed files with 742 additions and 620 deletions

View File

@@ -40,7 +40,7 @@ type Workflow interface {
GetWorkflowIDsByAppID(ctx context.Context, appID int64) ([]int64, error)
SyncExecuteWorkflow(ctx context.Context, config workflowModel.ExecuteConfig, input map[string]any) (*workflowEntity.WorkflowExecution, vo.TerminatePlan, error)
WithExecuteConfig(cfg workflowModel.ExecuteConfig) einoCompose.Option
WithMessagePipe() (compose.Option, *schema.StreamReader[*entity.Message])
WithMessagePipe() (compose.Option, *schema.StreamReader[*entity.Message], func())
}
type ExecuteConfig = workflowModel.ExecuteConfig

View File

@@ -66,7 +66,7 @@ func (i *impl) WithExecuteConfig(cfg workflowModel.ExecuteConfig) einoCompose.Op
return i.DomainSVC.WithExecuteConfig(cfg)
}
func (i *impl) WithMessagePipe() (compose.Option, *schema.StreamReader[*entity.Message]) {
func (i *impl) WithMessagePipe() (compose.Option, *schema.StreamReader[*entity.Message], func()) {
return i.DomainSVC.WithMessagePipe()
}