mirror of
https://github.com/immich-app/immich.git
synced 2024-12-29 15:11:58 +00:00
Added image tagging and object detection after generaing jpeg thumbnail
This commit is contained in:
parent
ad36b8b10f
commit
63bebd92e0
1 changed files with 7 additions and 0 deletions
|
@ -20,6 +20,9 @@ export class ThumbnailGeneratorProcessor {
|
||||||
private thumbnailGeneratorQueue: Queue,
|
private thumbnailGeneratorQueue: Queue,
|
||||||
|
|
||||||
private wsCommunicateionGateway: CommunicationGateway,
|
private wsCommunicateionGateway: CommunicationGateway,
|
||||||
|
|
||||||
|
@InjectQueue('metadata-extraction-queue')
|
||||||
|
private metadataExtractionQueue: Queue,
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
@Process('generate-jpeg-thumbnail')
|
@Process('generate-jpeg-thumbnail')
|
||||||
|
@ -48,6 +51,8 @@ export class ThumbnailGeneratorProcessor {
|
||||||
asset.resizePath = jpegThumbnailPath;
|
asset.resizePath = jpegThumbnailPath;
|
||||||
|
|
||||||
await this.thumbnailGeneratorQueue.add('generate-webp-thumbnail', { asset }, { jobId: randomUUID() });
|
await this.thumbnailGeneratorQueue.add('generate-webp-thumbnail', { asset }, { jobId: randomUUID() });
|
||||||
|
await this.metadataExtractionQueue.add('tag-image', { asset }, { jobId: randomUUID() });
|
||||||
|
await this.metadataExtractionQueue.add('detect-object', { asset }, { jobId: randomUUID() });
|
||||||
this.wsCommunicateionGateway.server.to(asset.userId).emit('on_upload_success', JSON.stringify(asset));
|
this.wsCommunicateionGateway.server.to(asset.userId).emit('on_upload_success', JSON.stringify(asset));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -72,6 +77,8 @@ export class ThumbnailGeneratorProcessor {
|
||||||
asset.resizePath = jpegThumbnailPath;
|
asset.resizePath = jpegThumbnailPath;
|
||||||
|
|
||||||
await this.thumbnailGeneratorQueue.add('generate-webp-thumbnail', { asset }, { jobId: randomUUID() });
|
await this.thumbnailGeneratorQueue.add('generate-webp-thumbnail', { asset }, { jobId: randomUUID() });
|
||||||
|
await this.metadataExtractionQueue.add('tag-image', { asset }, { jobId: randomUUID() });
|
||||||
|
await this.metadataExtractionQueue.add('detect-object', { asset }, { jobId: randomUUID() });
|
||||||
|
|
||||||
this.wsCommunicateionGateway.server.to(asset.userId).emit('on_upload_success', JSON.stringify(asset));
|
this.wsCommunicateionGateway.server.to(asset.userId).emit('on_upload_success', JSON.stringify(asset));
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue