Update metadata visualisation through the websocket

This commit is contained in:
yannfrendo
2023-11-24 11:34:33 +01:00
parent 0ac9f152cf
commit d1b96967ee
3 changed files with 18 additions and 17 deletions

View File

@@ -166,7 +166,12 @@ export class JobService {
break;
case JobName.METADATA_EXTRACTION:
const [asset] = await this.assetRepository.getByIds([item.data.id]);
if (asset) {
this.communicationRepository.send(CommunicationEvent.ASSET_UPDATE, asset.ownerId, mapAsset(asset));
}
await this.jobRepository.queue({ name: JobName.LINK_LIVE_PHOTOS, data: item.data });
break;
case JobName.LINK_LIVE_PHOTOS:
@@ -215,14 +220,6 @@ export class JobService {
this.communicationRepository.send(CommunicationEvent.UPLOAD_SUCCESS, asset.ownerId, mapAsset(asset));
}
}
case JobName.SIDECAR_WRITE: {
const [asset] = await this.assetRepository.getByIds([item.data.id]);
if (asset) {
this.communicationRepository.send(CommunicationEvent.ASSET_UPDATE, asset.ownerId, mapAsset(asset));
}
break;
}
}
// In addition to the above jobs, all of these should queue `SEARCH_INDEX_ASSET`