fix: cluster worker config issues
This commit is contained in:
@@ -166,11 +166,11 @@ const useSetChunkRequest = () => {
|
||||
return axiosToken.current;
|
||||
};
|
||||
|
||||
const setChunkRequest = async (config: RequestConfig) => {
|
||||
const setChunkRequest = (config: RequestConfig) => {
|
||||
requestConfig.current = { ...particalConfig, ...config };
|
||||
retryCount.current = totalCount;
|
||||
clearTimeout(timer.current);
|
||||
await axiosChunkRequest(requestConfig.current);
|
||||
axiosChunkRequest(requestConfig.current);
|
||||
return axiosToken;
|
||||
};
|
||||
|
||||
|
||||
@@ -117,7 +117,7 @@ export default function useTableFetch<T>(
|
||||
try {
|
||||
const query = _.omit(params || queryParams, ['page', 'perPage']);
|
||||
|
||||
chunkRequedtRef.current = await setChunkRequest({
|
||||
chunkRequedtRef.current = setChunkRequest({
|
||||
url: `${API}?${qs.stringify(_.pickBy(query, (val: any) => !!val))}`,
|
||||
handler: updateHandler
|
||||
});
|
||||
|
||||
@@ -30,7 +30,7 @@ export default function useWatchList<T = Record<string, any>>(API: string) {
|
||||
const createWatchChunkRequest = useMemoizedFn(async () => {
|
||||
chunkRequestRef.current?.current?.cancel?.();
|
||||
try {
|
||||
chunkRequestRef.current = await setChunkRequest({
|
||||
chunkRequestRef.current = setChunkRequest({
|
||||
url: `${watchAPI}`,
|
||||
params: {},
|
||||
handler: updateWatchDataListHandler
|
||||
|
||||
Reference in New Issue
Block a user