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:
@ -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;
|
||||
|
Reference in New Issue
Block a user