Skip to content

Commit

Permalink
feat(timeout): removing timeout on trainFlow
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabio Colajanni committed Feb 1, 2024
1 parent 9fb5753 commit 0774cdf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/lib/flows.ts
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ export const diffFlows = async (flowName: string, mode: string = 'full'): Promis
* Trains a Flow
* @param flowName The name of the Flow
*/
export const trainFlow = async (flowName: string, timeout: number = 10000): Promise<void> => {
export const trainFlow = async (flowName: string): Promise<void> => {
const flowsDir = CONFIG.agentDir + "/flows";
const flowDir = flowsDir + "/" + flowName;

Expand All @@ -405,10 +405,10 @@ export const trainFlow = async (flowName: string, timeout: number = 10000): Prom
});

try {
await checkTask(result._id, timeout);
await checkTask(result._id);
console.log(`\n[${chalk.green("success")}] Intents trained for locale ${chalk.yellow(locale.name)}`);
} catch (err) {
console.log(`\n[${chalk.red("error")}] Intents in ${chalk.yellow(locale)} couldn't be trained within timeout period (${5 * timeout} ms)`);
console.log(`\n[${chalk.red("error")}] Intents in ${chalk.yellow(locale)} couldn't be trained)`);
}
spinner.stop();
}
Expand Down

0 comments on commit 0774cdf

Please sign in to comment.