Unverified Commit 9b48d325 authored by Andrey Azov's avatar Andrey Azov Committed by GitHub
Browse files

Fix the import of the web worker for gene sequence fetching (#487)

Forgot to update the import of the sequence downloading web worker into the gene sequence fetcher.
Using the worker loader of webpack 5 now.
parent fe22d6ae
Pipeline #142803 passed with stages
in 10 minutes and 33 seconds
......@@ -21,12 +21,16 @@ import downloadAsFile from 'src/shared/helpers/downloadAsFile';
import { TranscriptOptions } from '../instant-download-transcript/InstantDownloadTranscript';
import { fetchGeneSequenceMetadata } from './fetchSequenceChecksums';
import { WorkerApi } from 'src/shared/workers/sequenceFetcher.worker';
import {
getGenomicSequenceData,
prepareDownloadParameters
} from './fetchForTranscript';
// @ts-expect-error There is in fact no default export in the worker
import SequenceFetcherWorker, {
WorkerApi
} from 'src/shared/workers/sequenceFetcher.worker';
type GeneOptions = {
transcript: Partial<TranscriptOptions>;
gene: {
......@@ -69,9 +73,8 @@ export const fetchForGene = async (payload: FetchPayload) => {
);
}
const worker = new Worker('src/shared/workers/sequenceFetcher.worker', {
type: 'module'
});
const worker = new SequenceFetcherWorker();
const service = wrap<WorkerApi>(worker);
const sequences = await service.downloadSequences(sequenceDownloadParams);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment