fix: removing repacks from worker threads to fix race condition

This commit is contained in:
Chubby Granny Chaser 2024-06-03 23:09:47 +01:00
parent 4559e23610
commit ea923d5082
No known key found for this signature in database
13 changed files with 71 additions and 105 deletions

View file

@ -2,6 +2,7 @@ import { dataSource } from "@main/data-source";
import { DownloadSource, Repack } from "@main/entity";
import { downloadSourceSchema } from "@main/events/helpers/validators";
import { downloadSourceRepository } from "@main/repository";
import { RepacksManager } from "@main/services";
import { downloadSourceWorker } from "@main/workers";
import { chunk } from "lodash-es";
import type { EntityManager } from "typeorm";
@ -65,5 +66,7 @@ export const fetchDownloadSourcesAndUpdate = async () => {
result.downloads
);
}
await RepacksManager.updateRepacks();
});
};