-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: update importer version #502
Conversation
importconfig "github.com/vesoft-inc/nebula-importer/pkg/config" | ||
importererrors "github.com/vesoft-inc/nebula-importer/pkg/errors" | ||
"github.com/vesoft-inc/nebula-importer/v4/pkg/config" | ||
configbase "github.com/vesoft-inc/nebula-importer/v4/pkg/config/base" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use github.com/vesoft-inc/nebula-importer/v4/pkg/config
?
} | ||
|
||
task.TaskInfo.TaskStatus = StatusFinished.String() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When Stop
, it will be executed here. Is this expected?
|
||
importConfig "github.com/vesoft-inc/nebula-importer/v4/pkg/config" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
importconfig
?
failedProcessed: number; // The number of nodes and edges that have failed to be processed. | ||
totalProcessed: number; // The number of nodes and edges that have been processed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/** The number of nodes and edges that have failed to be processed. */
failedProcessed: number;
/** The number of nodes and edges that have been processed. */
totalProcessed: number;
data: [], | ||
activeItem: null, | ||
previewContent: [], | ||
// checkAll: false, | ||
// indeterminate: false, | ||
checkAll: false, | ||
indeterminate: false, | ||
loading: false, | ||
uploading: false, | ||
setState: (obj) => Object.assign(state, obj), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const localState = useLocalObservable(() => {
const initState = {
......
};
return {
...initState,
setState: (payload: Partial<typeof initState>) => Object.assign(localState, payload),
};
});
const refreshTime = () => { | ||
if(status === ITaskStatus.StatusProcessing) { | ||
time.current = dayjs.duration(dayjs(Date.now()).diff(dayjs.unix(createTime))).format('HH:mm:ss'); | ||
time.current = dayjs.duration(dayjs(Date.now()).diff(dayjs(createTime))).format('HH:mm:ss'); | ||
timeoutId.current = window.setTimeout(refreshTime, 1000); | ||
} else { | ||
time.current = dayjs.duration(dayjs.unix(updateTime).diff(dayjs.unix(createTime))).format('HH:mm:ss'); | ||
time.current = dayjs.duration(dayjs(updateTime).diff(dayjs(createTime))).format('HH:mm:ss'); | ||
} | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
trigger per second, but won't cause component rendering
{processedBytes > 0 && <span> | ||
{status !== ITaskStatus.StatusFinished && `${getFileSize(processedBytes)} / `} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TaskStatus.Finished
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
const addMsg = () => { | ||
const info: string[] = []; | ||
if(numFailed > 0) { | ||
info.push(intl.get('import.notImported', { total: numFailed })); | ||
} | ||
if(numReadFailed > 0) { | ||
info.push(intl.get('import.readFailed', { total: numReadFailed })); | ||
if(failedProcessed > 0) { | ||
info.push(intl.get('import.notImported', { total: failedProcessed })); | ||
} | ||
info.length > 0 && setExtraMsg(info.join(', ')); | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unnecessary string list
What type of PR is this?
What problem(s) does this PR solve?
Issue(s) number:
Description:
How do you solve it?
Special notes for your reviewer, ex. impact of this fix, design document, etc: