File tree Expand file tree Collapse file tree 3 files changed +14
-9
lines changed Expand file tree Collapse file tree 3 files changed +14
-9
lines changed Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ export class AppService {
5757 tasks . push ( instance ) ;
5858 const result = await this . dispatchService . updateTasks ( tasks ) ;
5959 if ( ! result || result . length === 0 ) {
60- throw new Error ( 'Failed to update tasks ' ) ;
60+ throw new Error ( '添加任务失败,请重新尝试 ' ) ;
6161 }
6262
6363 // 遍历 result 检查,判断是否存在 error 属性
Original file line number Diff line number Diff line change @@ -165,13 +165,18 @@ export class DispatchService {
165165 | null
166166 > {
167167 try {
168- return await emitAndWait ( this . io , 'strategyService-updateTasks' , {
169- tasks : tasks . map ( ( task ) => ( {
170- task_id : task . id ,
171- app_id : task . app_id ,
172- env_id : task . env_id ,
173- } ) ) ,
174- } ) ;
168+ return await emitAndWait (
169+ this . io ,
170+ 'strategyService-updateTasks' ,
171+ {
172+ tasks : tasks . map ( ( task ) => ( {
173+ task_id : task . id ,
174+ app_id : task . app_id ,
175+ env_id : task . env_id ,
176+ } ) ) ,
177+ } ,
178+ 20000 ,
179+ ) ;
175180 } catch ( error ) {
176181 console . error ( 'Failed to add task' , error ) ;
177182 return null ;
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ export class DifyAI extends APIClient {
2828 const {
2929 apiKey = process . env . DIFY_API_KEY || '' ,
3030 baseURL = 'https://api.dify.ai/v1/' ,
31- timeout = 30000 ,
31+ timeout = 50000 ,
3232 httpAgent = undefined ,
3333 ...rest
3434 } = options ;
You can’t perform that action at this time.
0 commit comments