fix: add worker button do not work

This commit is contained in:
jialin
2025-12-18 10:56:45 +08:00
parent e4bd753355
commit b524587a9a
10 changed files with 62 additions and 26 deletions
@@ -58,10 +58,7 @@ const AddWorker: React.FC<AddWorkerProps> = (props) => {
stepList = []
} = props || {};
const intl = useIntl();
const startWatchRef = React.useRef(false);
const { addedCount, createModelsChunkRequest } = useAddWorkerMessage({
startWatch: startWatchRef
});
const { addedCount, createModelsChunkRequest } = useAddWorkerMessage();
const firstLoad = React.useRef(true);
const [registrationInfo, setRegistrationInfo] = React.useState<{
token: string;
@@ -83,7 +80,6 @@ const AddWorker: React.FC<AddWorkerProps> = (props) => {
...data,
cluster_id: value
});
startWatchRef.current = true;
} catch (error) {
firstLoad.current = false;
}