Perf system plugin and worker (#2126)
* perf: worker pool * perf: worker register * perf: worker controller * perf: system plugin worker * perf: system plugin worker * perf: worker * perf: worker * worker timeout * perf: copy icon
This commit is contained in:
@@ -32,14 +32,13 @@ const main = async (props: Props, retry = 3): Response => {
|
||||
};
|
||||
} catch (error) {
|
||||
if (retry <= 0) {
|
||||
addLog.warn('DuckDuckGo error', { error });
|
||||
return {
|
||||
result: 'Failed to fetch data'
|
||||
};
|
||||
}
|
||||
|
||||
addLog.warn('DuckDuckGo error', { error });
|
||||
|
||||
await delay(Math.random() * 2000);
|
||||
await delay(Math.random() * 5000);
|
||||
return main(props, retry - 1);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -31,14 +31,13 @@ const main = async (props: Props, retry = 3): Response => {
|
||||
};
|
||||
} catch (error) {
|
||||
if (retry <= 0) {
|
||||
addLog.warn('DuckDuckGo error', { error });
|
||||
return {
|
||||
result: 'Failed to fetch data'
|
||||
};
|
||||
}
|
||||
|
||||
addLog.warn('DuckDuckGo error', { error });
|
||||
|
||||
await delay(Math.random() * 2000);
|
||||
await delay(Math.random() * 5000);
|
||||
return main(props, retry - 1);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -32,14 +32,13 @@ const main = async (props: Props, retry = 3): Response => {
|
||||
};
|
||||
} catch (error) {
|
||||
if (retry <= 0) {
|
||||
addLog.warn('DuckDuckGo error', { error });
|
||||
return {
|
||||
result: 'Failed to fetch data'
|
||||
};
|
||||
}
|
||||
|
||||
addLog.warn('DuckDuckGo error', { error });
|
||||
|
||||
await delay(Math.random() * 2000);
|
||||
await delay(Math.random() * 5000);
|
||||
return main(props, retry - 1);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -32,14 +32,13 @@ const main = async (props: Props, retry = 3): Response => {
|
||||
};
|
||||
} catch (error) {
|
||||
if (retry <= 0) {
|
||||
addLog.warn('DuckDuckGo error', { error });
|
||||
return {
|
||||
result: 'Failed to fetch data'
|
||||
};
|
||||
}
|
||||
|
||||
addLog.warn('DuckDuckGo error', { error });
|
||||
|
||||
await delay(Math.random() * 2000);
|
||||
await delay(Math.random() * 5000);
|
||||
return main(props, retry - 1);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { NodeInputKeyEnum } from '@fastgpt/global/core/workflow/constants';
|
||||
import { Parser } from 'expr-eval';
|
||||
|
||||
type Props = {
|
||||
|
||||
Reference in New Issue
Block a user