mirror of
https://github.com/immich-app/immich.git
synced 2025-03-01 15:11:21 +01:00
fix(server): jobs using stale path (#2233)
* fix(server): jobs using stale path * fixed test * pr feedback
This commit is contained in:
parent
258bc328e0
commit
dd8d113334
2 changed files with 9 additions and 1 deletions
|
@ -213,6 +213,10 @@ describe(MediaService.name, () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('handleVideoConversion', () => {
|
describe('handleVideoConversion', () => {
|
||||||
|
beforeEach(() => {
|
||||||
|
assetMock.getByIds.mockResolvedValue([assetEntityStub.video]);
|
||||||
|
});
|
||||||
|
|
||||||
it('should log an error', async () => {
|
it('should log an error', async () => {
|
||||||
mediaMock.transcode.mockRejectedValue(new Error('unable to transcode'));
|
mediaMock.transcode.mockRejectedValue(new Error('unable to transcode'));
|
||||||
|
|
||||||
|
|
|
@ -119,7 +119,11 @@ export class MediaService {
|
||||||
}
|
}
|
||||||
|
|
||||||
async handleVideoConversion(job: IAssetJob) {
|
async handleVideoConversion(job: IAssetJob) {
|
||||||
const { asset } = job;
|
const [asset] = await this.assetRepository.getByIds([job.asset.id]);
|
||||||
|
|
||||||
|
if (!asset) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const input = asset.originalPath;
|
const input = asset.originalPath;
|
||||||
|
|
Loading…
Add table
Reference in a new issue