mirror of
https://github.com/immich-app/immich.git
synced 2025-01-21 00:52:43 -05:00
Fixed Websocket not getting correct data on mobile
This commit is contained in:
parent
e2169a26c2
commit
9642ad2820
1 changed files with 8 additions and 3 deletions
|
@ -19,6 +19,7 @@ import {
|
||||||
thumbnailGeneratorQueueName,
|
thumbnailGeneratorQueueName,
|
||||||
JpegGeneratorProcessor,
|
JpegGeneratorProcessor,
|
||||||
} from '@app/job';
|
} from '@app/job';
|
||||||
|
import { mapAsset } from 'apps/immich/src/api-v1/asset/response-dto/asset-response.dto';
|
||||||
|
|
||||||
@Processor(thumbnailGeneratorQueueName)
|
@Processor(thumbnailGeneratorQueueName)
|
||||||
export class ThumbnailGeneratorProcessor {
|
export class ThumbnailGeneratorProcessor {
|
||||||
|
@ -29,7 +30,7 @@ export class ThumbnailGeneratorProcessor {
|
||||||
@InjectQueue(thumbnailGeneratorQueueName)
|
@InjectQueue(thumbnailGeneratorQueueName)
|
||||||
private thumbnailGeneratorQueue: Queue,
|
private thumbnailGeneratorQueue: Queue,
|
||||||
|
|
||||||
private wsCommunicateionGateway: CommunicationGateway,
|
private wsCommunicationGateway: CommunicationGateway,
|
||||||
|
|
||||||
@InjectQueue(metadataExtractionQueueName)
|
@InjectQueue(metadataExtractionQueueName)
|
||||||
private metadataExtractionQueue: Queue,
|
private metadataExtractionQueue: Queue,
|
||||||
|
@ -68,7 +69,9 @@ export class ThumbnailGeneratorProcessor {
|
||||||
);
|
);
|
||||||
await this.metadataExtractionQueue.add(imageTaggingProcessorName, { asset }, { jobId: randomUUID() });
|
await this.metadataExtractionQueue.add(imageTaggingProcessorName, { asset }, { jobId: randomUUID() });
|
||||||
await this.metadataExtractionQueue.add(objectDetectionProcessorName, { asset }, { jobId: randomUUID() });
|
await this.metadataExtractionQueue.add(objectDetectionProcessorName, { asset }, { jobId: randomUUID() });
|
||||||
this.wsCommunicateionGateway.server.to(asset.userId).emit('on_upload_success', JSON.stringify(asset));
|
this.wsCommunicationGateway.server
|
||||||
|
.to(asset.userId)
|
||||||
|
.emit('on_upload_success', JSON.stringify(mapAsset(asset)));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -99,7 +102,9 @@ export class ThumbnailGeneratorProcessor {
|
||||||
await this.metadataExtractionQueue.add(imageTaggingProcessorName, { asset }, { jobId: randomUUID() });
|
await this.metadataExtractionQueue.add(imageTaggingProcessorName, { asset }, { jobId: randomUUID() });
|
||||||
await this.metadataExtractionQueue.add(objectDetectionProcessorName, { asset }, { jobId: randomUUID() });
|
await this.metadataExtractionQueue.add(objectDetectionProcessorName, { asset }, { jobId: randomUUID() });
|
||||||
|
|
||||||
this.wsCommunicateionGateway.server.to(asset.userId).emit('on_upload_success', JSON.stringify(asset));
|
this.wsCommunicationGateway.server
|
||||||
|
.to(asset.userId)
|
||||||
|
.emit('on_upload_success', JSON.stringify(mapAsset(asset)));
|
||||||
})
|
})
|
||||||
.run();
|
.run();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue