1
1
mirror of https://github.com/Fabio286/antares.git synced 2025-06-05 21:59:22 +02:00

perf: use fork() for the import process

This commit is contained in:
2022-02-24 13:14:57 +01:00
parent 1990d9a3d4
commit 573ac6d42e
8 changed files with 197 additions and 115 deletions

View File

@ -86,11 +86,22 @@ export default {
const params = {
uid,
type: client,
schema: this.selectedSchema,
file: sqlFile
};
const result = await Schema.import(params);
console.log(result);
try {
const { status, response } = await Schema.import(params);
if (status === 'success')
this.progressStatus = response.cancelled ? this.$t('word.aborted') : this.$t('word.completed');
else {
this.progressStatus = response;
this.addNotification({ status: 'error', message: response });
}
}
catch (err) {
this.addNotification({ status: 'error', message: err.stack });
}
this.isImporting = false;
},