Revert "feat(core): run indexer in worker (#7295)"

This reverts commit c62d79ab14.
This commit is contained in:
forehalo
2024-07-03 10:16:27 +08:00
parent fc729d6a32
commit f0d127fa29
13 changed files with 352 additions and 691 deletions
@@ -155,9 +155,6 @@ export class IndexedDBJobQueue<J> implements JobQueue<J> {
.objectStore('jobs')
.delete(typeof id === 'string' ? parseInt(id) : id);
}
trx.commit();
this.broadcast.postMessage('job-completed');
}
async return(jobs: Job[], retry: boolean = false): Promise<void> {
@@ -177,10 +174,6 @@ export class IndexedDBJobQueue<J> implements JobQueue<J> {
.delete(typeof id === 'string' ? parseInt(id) : id);
}
}
trx.commit();
this.broadcast.postMessage('job-completed');
}
async clear(): Promise<void> {
+1 -1
View File
@@ -29,7 +29,7 @@ export class JobRunner<J> {
}
stop() {
this.abort?.abort(MANUALLY_STOP);
this.abort?.abort();
this.abort = null;
}