Skip to content
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

Merged
merged 4 commits into from
Mar 16, 2023
Merged

feat: update importer version #502

merged 4 commits into from
Mar 16, 2023

Conversation

hetao92
Copy link
Contributor

@hetao92 hetao92 commented Mar 8, 2023

What type of PR is this?

  • bug
  • feature
  • enhancement

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:

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"
Copy link
Contributor

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()
Copy link
Contributor

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"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

importconfig?

veezhang
veezhang previously approved these changes Mar 9, 2023
Comment on lines +21 to +22
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.
Copy link
Contributor

@huaxiabuluo huaxiabuluo Mar 14, 2023

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;

Comment on lines 39 to 46
data: [],
activeItem: null,
previewContent: [],
// checkAll: false,
// indeterminate: false,
checkAll: false,
indeterminate: false,
loading: false,
uploading: false,
setState: (obj) => Object.assign(state, obj),
Copy link
Contributor

@huaxiabuluo huaxiabuluo Mar 14, 2023

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),
  };
});

Comment on lines 89 to 96
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');
}
};
Copy link
Contributor

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

Comment on lines +131 to +132
{processedBytes > 0 && <span>
{status !== ITaskStatus.StatusFinished && `${getFileSize(processedBytes)} / `}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TaskStatus.Finished

Copy link
Contributor

@huaxiabuluo huaxiabuluo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment on lines 63 to 69
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(', '));
};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unnecessary string list

@hetao92 hetao92 merged commit 7fd290a into vesoft-inc:master Mar 16, 2023
@hetao92 hetao92 deleted the hetao-dev branch April 3, 2023 06:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants