mirror of
https://github.com/immich-app/immich.git
synced 2025-12-24 09:14:58 +03:00
test: serialise the buffer over events
This commit is contained in:
@@ -371,7 +371,11 @@ export class IntegrityService extends BaseService {
|
||||
await this.jobRepository.queue({
|
||||
name: JobName.IntegrityChecksumFilesRefresh,
|
||||
data: {
|
||||
items: batchReports,
|
||||
items: batchReports.map(({ path, reportId, checksum }) => ({
|
||||
path,
|
||||
reportId,
|
||||
checksum: checksum?.toString('hex'),
|
||||
})),
|
||||
},
|
||||
});
|
||||
|
||||
@@ -505,7 +509,7 @@ export class IntegrityService extends BaseService {
|
||||
}),
|
||||
]);
|
||||
|
||||
if (checksum.equals(hash.digest())) {
|
||||
if (Buffer.from(checksum, 'hex').equals(hash.digest())) {
|
||||
return reportId;
|
||||
}
|
||||
} catch (error) {
|
||||
|
||||
@@ -296,7 +296,7 @@ export interface IIntegrityPathWithReportJob {
|
||||
}
|
||||
|
||||
export interface IIntegrityPathWithChecksumJob {
|
||||
items: { path: string; reportId: string | null; checksum?: Buffer | null }[];
|
||||
items: { path: string; reportId: string | null; checksum?: string | null }[];
|
||||
}
|
||||
|
||||
export interface JobCounts {
|
||||
|
||||
Reference in New Issue
Block a user