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

perf: use fork() for the export process

This commit is contained in:
2022-02-18 18:16:13 +01:00
parent 4051eff382
commit 748d44977e
9 changed files with 149 additions and 178 deletions

View File

@ -292,6 +292,7 @@ export default {
},
methods: {
...mapActions({
addNotification: 'notifications/addNotification',
refreshSchema: 'workspaces/refreshSchema'
}),
async startExport () {
@ -306,13 +307,17 @@ export default {
...this.options
};
const result = await Schema.export(params);
if (result) {
if (result.status === 'success')
this.progressStatus = result.response.cancelled ? this.$t('word.aborted') : this.$t('word.completed');
else
this.progressStatus = result.response;
try {
const { status, response } = await Schema.export(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.isExporting = false;