Skip to content

Commit

Permalink
0.22.6 HotFix cancel before load
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomansion committed Apr 26, 2023
1 parent 46d7385 commit 1012daf
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
2 changes: 1 addition & 1 deletion backend/swagger.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
swagger: "2.0"
info:
version: 0.22.5
version: 0.22.6
title: DebiAI_BACKEND_API
description: DebiAI backend api
contact:
Expand Down
2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "debiai_frontend",
"version": "0.22.5",
"version": "0.22.6",
"description": "Frontend for Debiai, made with Vuejs",
"license": "Apache-2.0",
"scripts": {
Expand Down
18 changes: 11 additions & 7 deletions frontend/src/services/dataLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -397,12 +397,10 @@ async function downloadResults(projectMetadata, modelId, sampleIds) {
// Check if the request has been canceled
if (currentAnalysis.canceled) break;
}
} catch (error) {
store.commit("endRequest", requestCode);
throw error;
updateRequestProgress(requestCode, 1);
} finally {
endRequest(requestCode);
}
updateRequestProgress(requestCode, 1);
endRequest(requestCode);

return modelResultsRet;
}
Expand Down Expand Up @@ -652,15 +650,21 @@ async function loadProjectSamples({
data = await arrayToJson(array, metaData);
data.sampleIdList = sampleIdList;
}
} catch (e) {
console.error(e);
resetCurrentAnalysis();
throw e;
} finally {
// End the analysis
cancelCallback();
endRequest(requestCode);
}

if (currentAnalysis.canceled) {
// The analysis was canceled, we return null
resetCurrentAnalysis();
return;
}

// Got the samples, we return the data
resetCurrentAnalysis();
return data;
}
Expand Down

0 comments on commit 1012daf

Please sign in to comment.