Skip to content

Commit

Permalink
Merge branch 'master' of github.com:biomage-org/ui into refactor-etag
Browse files Browse the repository at this point in the history
Signed-off-by: Pol Alvarez <[email protected]>
  • Loading branch information
kafkasl committed Oct 25, 2023
2 parents 0cc687f + 3a97656 commit 0eec26a
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ describe('Normalized matrix index page', () => {

await waitFor(() => {
expect(writeToFileURL).toHaveBeenCalledWith(result);
expect(downloadFromUrl).toHaveBeenCalledWith(writeToFileURLResult, 'NormalizedExpression.csv');
expect(downloadFromUrl).toHaveBeenCalledWith(writeToFileURLResult, 'NormalizedExpression.csv.gz');
});
});

Expand Down Expand Up @@ -159,7 +159,7 @@ describe('Normalized matrix index page', () => {

await waitFor(() => {
expect(writeToFileURL).toHaveBeenCalledWith(result);
expect(downloadFromUrl).toHaveBeenCalledWith(writeToFileURLResult, 'NormalizedExpression.csv');
expect(downloadFromUrl).toHaveBeenCalledWith(writeToFileURLResult, 'NormalizedExpression.csv.gz');
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const downloadNormalizedMatrix = (
dispatch,
);

downloadFromUrl(writeToFileURL(data), 'NormalizedExpression.csv');
downloadFromUrl(writeToFileURL(data), 'NormalizedExpression.csv.gz');

dispatch({
type: PLOT_DATA_LOADED,
Expand Down
4 changes: 2 additions & 2 deletions src/utils/getTimeoutForWorkerTask.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ const getTimeoutForWorkerTask = (state, taskName) => {
switch (taskName) {
case 'GetEmbedding':
case 'ListGenes':
case 'MarkerHeatmap': {
case 'MarkerHeatmap':
case 'GetNormalizedExpression': {
// all of this calls can happen at the same time and each of them can potentially have to
// wait for the others to finish before it starts processing (due to the SQS) so the timeout
// needs to be large enough for the slowest task to finish
Expand All @@ -36,7 +37,6 @@ const getTimeoutForWorkerTask = (state, taskName) => {
case 'GeneExpression':
case 'GetMitochondrialContent':
case 'GetDoubletScore':
case 'GetNormalizedExpression':
case 'DownloadAnnotSeuratObject':
case 'DifferentialExpression':
case 'GetNUmis':
Expand Down
2 changes: 1 addition & 1 deletion src/utils/work/unpackResult.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { decompress } from 'fflate';

const unpackResult = async (storageResp, taskName = null) => {
// SeuratObject can fail to download when loaded into memory
if (taskName === 'DownloadAnnotSeuratObject') {
if (taskName === 'DownloadAnnotSeuratObject' || taskName === 'GetNormalizedExpression') {
const blob = await storageResp.blob();
return (blob);
}
Expand Down
3 changes: 2 additions & 1 deletion src/utils/work/waitForWorkRequest.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ const getWorkerTimeout = (taskName, defaultTimeout) => {
switch (taskName) {
case 'GetEmbedding':
case 'ListGenes':
case 'MarkerHeatmap': {
case 'MarkerHeatmap':
case 'GetNormalizedExpression': {
return dayjs().add(1800, 's').toISOString();
}

Expand Down

0 comments on commit 0eec26a

Please sign in to comment.