refactor: new asset-job repository (#17622)

* refactor: new asset-job repository

* fix: broken medium tests on main
This commit is contained in:
Jason Rasmussen
2025-04-15 10:24:51 -04:00
committed by GitHub
parent a522130122
commit 17e720440d
17 changed files with 239 additions and 205 deletions

View File

@@ -118,7 +118,7 @@ export class StorageTemplateService extends BaseService {
return JobStatus.SKIPPED;
}
const asset = await this.assetRepository.getStorageTemplateAsset(id);
const asset = await this.assetJobRepository.getForStorageTemplateJob(id);
if (!asset) {
return JobStatus.FAILED;
}
@@ -130,7 +130,7 @@ export class StorageTemplateService extends BaseService {
// move motion part of live photo
if (asset.livePhotoVideoId) {
const livePhotoVideo = await this.assetRepository.getStorageTemplateAsset(asset.livePhotoVideoId);
const livePhotoVideo = await this.assetJobRepository.getForStorageTemplateJob(asset.livePhotoVideoId);
if (!livePhotoVideo) {
return JobStatus.FAILED;
}
@@ -152,7 +152,7 @@ export class StorageTemplateService extends BaseService {
await this.moveRepository.cleanMoveHistory();
const assets = this.assetRepository.streamStorageTemplateAssets();
const assets = this.assetJobRepository.streamForStorageTemplateJob();
const users = await this.userRepository.getList();
for await (const asset of assets) {