move exportInProgress reset to finally block

This commit is contained in:
Abhinav 2023-02-22 15:10:11 +05:30
parent 489bf70925
commit 7940c023d0

View file

@ -163,11 +163,12 @@ class ExportService {
exportDir exportDir
); );
const resp = await this.exportInProgress; const resp = await this.exportInProgress;
this.exportInProgress = null;
return resp; return resp;
} catch (e) { } catch (e) {
logError(e, 'exportFiles failed'); logError(e, 'exportFiles failed');
return { paused: false }; return { paused: false };
} finally {
this.exportInProgress = null;
} }
} }